[Django] #32715: Duplicated CRUD permissions when renaming a model

5 views
Skip to first unread message

Django

unread,
May 5, 2021, 12:06:48 AM5/5/21
to django-...@googlegroups.com
#32715: Duplicated CRUD permissions when renaming a model
-------------------------------------+-------------------------------------
Reporter: MrEscape | Owner: nobody
Type: Bug | Status: new
Component: | Version: 3.1
Migrations | Keywords: auth_permission
Severity: Normal | rename_model
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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!!

--
Ticket URL: <https://code.djangoproject.com/ticket/32715>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 5, 2021, 1:34:42 AM5/5/21
to django-...@googlegroups.com
#32715: Duplicated CRUD permissions when renaming a model
-------------------------------------+-------------------------------------
Reporter: MrEscape | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 3.1
Severity: Normal | Resolution: duplicate
Keywords: auth_permission | Triage Stage:
rename_model | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => duplicate
* component: Migrations => contrib.auth


Comment:

Duplicate of #27489.

--
Ticket URL: <https://code.djangoproject.com/ticket/32715#comment:1>

Reply all
Reply to author
Forward
0 new messages