Skip to content

Commit 5486111

Browse files
committed
fixing bug where get_migration_managers wasn't inclusive
1 parent 266706a commit 5486111

File tree

1 file changed

+6
-7
lines changed
  • piccolo/apps/migrations/commands

1 file changed

+6
-7
lines changed

piccolo/apps/migrations/commands/base.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,12 @@ def get_migration_managers(
8787
for _, migration_module in migration_modules.items():
8888
response = run_sync(migration_module.forwards())
8989
if isinstance(response, MigrationManager):
90-
if max_migration_id:
91-
if response.migration_id == max_migration_id:
92-
break
93-
else:
94-
migration_managers.append(response)
95-
else:
96-
migration_managers.append(response)
90+
migration_managers.append(response)
91+
if (
92+
max_migration_id
93+
and response.migration_id == max_migration_id
94+
):
95+
break
9796

9897
if offset > 0:
9998
raise Exception(

0 commit comments

Comments
 (0)