hisham-cmd commited on
Commit
81c48df
·
verified ·
1 Parent(s): c5f45f8

Upload app/api/seed.py

Browse files
Files changed (1) hide show
  1. app/api/seed.py +4 -3
app/api/seed.py CHANGED
@@ -98,10 +98,11 @@ async def seed_database(clear: bool = False, db: Session = Depends(get_db)):
98
  statusCode=200,
99
  )
100
 
101
- json_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "real_products_500.json")
102
- # Fallback to products_dump.json if 500 file not found
 
103
  if not os.path.exists(json_path):
104
- json_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "products_dump.json")
105
 
106
  if not os.path.exists(json_path):
107
  return AuthResponse(
 
98
  statusCode=200,
99
  )
100
 
101
+ json_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "real_products_scraped.json")
102
+
103
+ # Fallback to real_products_500.json if scraped file not found
104
  if not os.path.exists(json_path):
105
+ json_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "real_products_500.json")
106
 
107
  if not os.path.exists(json_path):
108
  return AuthResponse(