esraacevik
commited on
Commit
·
0827725
1
Parent(s):
ceac0ad
fix: Fix UnboundLocalError for embeddings_updated in else block
Browse filesCritical bug fix:
- embeddings_updated was not set in the else block (default data path)
- This caused UnboundLocalError when trying to return the variable
- Now explicitly set to False in else block
- Fixes HTTP 500 error when creating reports
- api_server.py +3 -1
api_server.py
CHANGED
|
@@ -876,7 +876,9 @@ def create_report():
|
|
| 876 |
logger.exception(e)
|
| 877 |
embeddings_updated = False
|
| 878 |
else:
|
| 879 |
-
# Use default CSV path
|
|
|
|
|
|
|
| 880 |
csv_path = 'data/data_with_application.csv'
|
| 881 |
|
| 882 |
# Read existing CSV
|
|
|
|
| 876 |
logger.exception(e)
|
| 877 |
embeddings_updated = False
|
| 878 |
else:
|
| 879 |
+
# Use default CSV path (no user-specific data)
|
| 880 |
+
# Embeddings won't be updated for default data
|
| 881 |
+
embeddings_updated = False
|
| 882 |
csv_path = 'data/data_with_application.csv'
|
| 883 |
|
| 884 |
# Read existing CSV
|