Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#34087 closed Bug (duplicate)

Migration ignores Inheritance for Meta.default_permissions

Reported by: Ronny Vedrilla Owned by: nobody
Component: Migrations Version: 4.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ronny Vedrilla)

Hi there!

I just encountered a bug I believe. I created a [demo repo](https://github.com/GitRon/django-migrations-bug-default-permissions-demo) to help isolate the problem.

I created two models here: https://github.com/GitRon/django-migrations-bug-default-permissions-demo/blob/main/migration_bug_demo/demo/models.py

Model one inherits from a Mixin which defines "Meta.default_permissions". The other one defines the Meta itself.

As you can see in the migration, the inheritance is being ignored:

Model with direct definition of "default_permissions":
https://github.com/GitRon/django-migrations-bug-default-permissions-demo/blob/main/migration_bug_demo/demo/migrations/0001_initial.py#L29

Model with inherited definition of "default_permissions":
https://github.com/GitRon/django-migrations-bug-default-permissions-demo/blob/main/migration_bug_demo/demo/migrations/0001_initial.py#L46

I hope you agree with my opinion! Other options like "managed" will be inherited, so I really do think this is a bug and not a feature.

Best regards
Ronny

Change History (3)

comment:1 by Ronny Vedrilla, 21 months ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 21 months ago

Resolution: duplicate
Status: newclosed

As far as I'm aware, it's a duplicate of #29386.

comment:3 by Ronny Vedrilla, 21 months ago

Hi Mariusz! Sorry, I used the search but I didnt find the other ticket!

Note: See TracTickets for help on using tickets.
Back to Top