Opened 3 years ago

Closed 3 years ago

#32715 closed Bug (duplicate)

Duplicated CRUD permissions when renaming a model

Reported by: MrEscape Owned by: nobody
Component: contrib.auth Version: 3.1
Severity: Normal Keywords: auth_permission rename_model
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, in a project I am developing I had to change a model class name. The migration process run successfully, but the CRUD permissions were duplicated in the User admin panel.

Example:
App name: Account
Previous model name: ParentCompany
New model name: ParentAccount

Permissions:
account | Parent Account | Can add parent account
account | Parent Account | Can add parent company this should not be available.

same behavior for change, delete, view

I had to delete the extra 4 rows in the corresponding tables directly in the database and now the problem was fixed.
Maybe this could be part of the migration process.

Best regards and thanks to the django team!!

Change History (1)

comment:1 by Mariusz Felisiak, 3 years ago

Component: Migrationscontrib.auth
Resolution: duplicate
Status: newclosed

Duplicate of #27489.

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