Skip to content

Commit b11c7f3

Browse files
fix: only check for missing migrations in this app
Previously test would fail if there were missing migrations in apps in requirements. Also sets default_auto_field attribute on the app config to avoid unnecessary migration to be generated
1 parent da0642f commit b11c7f3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

djangocms_snippet/apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
class SnippetConfig(AppConfig):
66
name = 'djangocms_snippet'
77
verbose_name = _('Snippets')
8+
default_auto_field = 'django.db.models.AutoField'

tests/test_migrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_for_missing_migrations(self):
1919
}
2020

2121
try:
22-
call_command('makemigrations', **options)
22+
call_command('makemigrations', 'djangocms_snippet', **options)
2323
except SystemExit as e:
2424
status_code = str(e)
2525
else:

0 commit comments

Comments
 (0)