Opened 2 years ago
Last modified 2 years ago
#34087 closed Bug
Migration ignores Inheritance for Meta.default_permissions — at Initial Version
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
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!
Best regards
Ronny