Upload app.py
Browse files
app.py
CHANGED
|
@@ -239,9 +239,13 @@ def _ensure_data_layout():
|
|
| 239 |
if db_initialized:
|
| 240 |
return
|
| 241 |
_init_db_schema()
|
| 242 |
-
_migrate_legacy_file_data_if_needed()
|
| 243 |
db_initialized = True
|
| 244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
|
| 246 |
def _hash_password(password: str, salt_hex: Optional[str] = None):
|
| 247 |
salt = bytes.fromhex(salt_hex) if salt_hex else secrets.token_bytes(16)
|
|
|
|
| 239 |
if db_initialized:
|
| 240 |
return
|
| 241 |
_init_db_schema()
|
|
|
|
| 242 |
db_initialized = True
|
| 243 |
|
| 244 |
+
try:
|
| 245 |
+
_migrate_legacy_file_data_if_needed()
|
| 246 |
+
except Exception as exc:
|
| 247 |
+
logger.warning("Legacy data migration skipped due to error: %s", exc)
|
| 248 |
+
|
| 249 |
|
| 250 |
def _hash_password(password: str, salt_hex: Optional[str] = None):
|
| 251 |
salt = bytes.fromhex(salt_hex) if salt_hex else secrets.token_bytes(16)
|