Skip to content

Commit

Permalink
fix: Set the default_auto_field on the AppConfigs (#7181)
Browse files Browse the repository at this point in the history
Otherwise when someone sets the DEFAULT_AUTO_FIELD setting in their project unwanted migrations are created in the cms and menu app.

Fixes #7167
  • Loading branch information
jgadelange committed Jan 14, 2022
1 parent a412870 commit 272d62c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cms/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
class CMSConfig(AppConfig):
name = 'cms'
verbose_name = _("django CMS")
default_auto_field = 'django.db.models.AutoField'

def ready(self):
from cms.utils.setup import setup
Expand Down
1 change: 1 addition & 0 deletions menus/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
class MenusConfig(AppConfig):
name = 'menus'
verbose_name = _("django CMS menus system")
default_auto_field = 'django.db.models.AutoField'

0 comments on commit 272d62c

Please sign in to comment.