mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-03-18 20:39:46 +00:00
Move is_migration_needed call under try block too
This commit is contained in:
parent
355fc68232
commit
6c0af38e27
1 changed files with 6 additions and 6 deletions
|
@ -19,10 +19,10 @@ def run_migrations():
|
||||||
|
|
||||||
for migration in migrations:
|
for migration in migrations:
|
||||||
if migration.get_migration_name() not in skipped_migrations:
|
if migration.get_migration_name() not in skipped_migrations:
|
||||||
if migration.is_migration_needed():
|
try:
|
||||||
try:
|
if migration.is_migration_needed():
|
||||||
migration.migrate()
|
migration.migrate()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error while migrating {migration.get_migration_name()}")
|
print(f"Error while migrating {migration.get_migration_name()}")
|
||||||
print(e)
|
print(e)
|
||||||
print("Skipping this migration")
|
print("Skipping this migration")
|
||||||
|
|
Loading…
Add table
Reference in a new issue