Spaces:
Sleeping
Sleeping
Delete check_990.py with huggingface_hub
Browse files- check_990.py +0 -26
check_990.py
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import sys
|
| 3 |
-
sys.path.append(os.getcwd())
|
| 4 |
-
from app.db.base import SessionLocal
|
| 5 |
-
from app.models.product import Product
|
| 6 |
-
|
| 7 |
-
db = SessionLocal()
|
| 8 |
-
try:
|
| 9 |
-
print("Checking for products with price 990...")
|
| 10 |
-
products = db.query(Product).filter(Product.price == 990).all()
|
| 11 |
-
if products:
|
| 12 |
-
for p in products:
|
| 13 |
-
print(f"FOUND: {p.id} - {p.name_ar} - {p.price}")
|
| 14 |
-
else:
|
| 15 |
-
print("NOT FOUND by exact price. Checking compare_price...")
|
| 16 |
-
products = db.query(Product).filter(Product.compare_price == 990).all()
|
| 17 |
-
if products:
|
| 18 |
-
for p in products:
|
| 19 |
-
print(f"FOUND (compare): {p.id} - {p.name_ar} - {p.price} (was 990)")
|
| 20 |
-
else:
|
| 21 |
-
print("NOT FOUND by exact price/compare_price.")
|
| 22 |
-
|
| 23 |
-
count = db.query(Product).count()
|
| 24 |
-
print(f"Current Total Product Count: {count}")
|
| 25 |
-
finally:
|
| 26 |
-
db.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|