We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 024fb70 commit 45a9ddeCopy full SHA for 45a9dde
syzygy/management/commands/makemigrations.py
@@ -27,8 +27,12 @@ class StyledMigrationAutodetector(MigrationAutodetector):
27
def __init__(self, *args, **kwargs):
28
super().__init__(*args, **kwargs, style=style)
29
30
- makemigrations.MigrationAutodetector = StyledMigrationAutodetector
+ if hasattr(self, "autodetector"):
31
+ self.autodetector = StyledMigrationAutodetector
32
+ else:
33
+ makemigrations.MigrationAutodetector = StyledMigrationAutodetector
34
try:
35
super().handle(*args, **options)
36
finally:
- makemigrations.MigrationAutodetector = MigrationAutodetector_
37
+ if not hasattr(self, "autodetector"):
38
+ makemigrations.MigrationAutodetector = MigrationAutodetector_
0 commit comments