mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-05 23:54:19 +00:00
Move is_migration_needed call under try block too
This commit is contained in:
parent
355fc68232
commit
6c0af38e27
|
@ -19,10 +19,10 @@ def run_migrations():
|
|||
|
||||
for migration in migrations:
|
||||
if migration.get_migration_name() not in skipped_migrations:
|
||||
if migration.is_migration_needed():
|
||||
try:
|
||||
try:
|
||||
if migration.is_migration_needed():
|
||||
migration.migrate()
|
||||
except Exception as e:
|
||||
print(f"Error while migrating {migration.get_migration_name()}")
|
||||
print(e)
|
||||
print("Skipping this migration")
|
||||
except Exception as e:
|
||||
print(f"Error while migrating {migration.get_migration_name()}")
|
||||
print(e)
|
||||
print("Skipping this migration")
|
||||
|
|
Loading…
Reference in a new issue