diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8878e8f567..fc9f91c057 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,7 @@ Changelog * Fix: Ensure aliases are published when the source page is published (Karl Hobley) * Fix: Prevent error when saving embeds that do not include a thumbnail URL (Cynthia Kiser) + * Fix: Prevent failure when running `manage.py dumpdata` with no arguments (Matt Westcott) 2.12 (02.02.2021) diff --git a/docs/releases/2.12.1.rst b/docs/releases/2.12.1.rst index 4cebcdcd6f..5929ee3edb 100644 --- a/docs/releases/2.12.1.rst +++ b/docs/releases/2.12.1.rst @@ -15,3 +15,4 @@ Bug fixes * Ensure aliases are published when the source page is published (Karl Hobley) * Prevent error when saving embeds that do not include a thumbnail URL (Cynthia Kiser) + * Prevent failure when running `manage.py dumpdata` with no arguments (Matt Westcott) diff --git a/wagtail/admin/migrations/0003_admin_managed.py b/wagtail/admin/migrations/0003_admin_managed.py new file mode 100644 index 0000000000..1c16a66649 --- /dev/null +++ b/wagtail/admin/migrations/0003_admin_managed.py @@ -0,0 +1,24 @@ +# Generated by Django 3.1.5 on 2021-02-15 15:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailadmin', '0002_admin'), + ] + + operations = [ + migrations.DeleteModel(name='Admin'), + migrations.CreateModel( + name='Admin', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'permissions': [('access_admin', 'Can access Wagtail admin')], + 'default_permissions': [], + }, + ), + ] diff --git a/wagtail/admin/models.py b/wagtail/admin/models.py index 56c9924ce4..04cd81c688 100644 --- a/wagtail/admin/models.py +++ b/wagtail/admin/models.py @@ -13,10 +13,9 @@ from wagtail.core.models import Page # A dummy model that exists purely to attach the access_admin permission type to, so that it # doesn't get identified as a stale content type and removed by the remove_stale_contenttypes -# management command. managed = False ensures that this doesn't create a database table. +# management command. class Admin(Model): class Meta: - managed = False default_permissions = [] # don't create the default add / change / delete / view perms permissions = [ ('access_admin', "Can access Wagtail admin"),