Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#26997 closed Bug (fixed)

Checks framework crash on empty model Meta.default_permissions

Reported by: Сергей Owned by: Sergey Yurchenko
Component: contrib.auth Version: 1.10
Severity: Release blocker Keywords: permissions
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Сергей)

While trying to port project to django 1.10 I found an error.
If Meta of model has default_permissions = () django crashes on runserver, makemigrations and all other commands.
Test project can is located at
https://github.com/hellpain/django_default_permissions_bug/
Example of corrupted model:
https://github.com/hellpain/django_default_permissions_bug/blob/master/foo_app/models.py

This bug is caused to refactored checks in contrib.auth

PR to fix bug: https://github.com/django/django/pull/7007

Attachments (1)

diff.txt (1.6 KB) - added by Сергей 3 years ago.
bug fix + tests

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by Сергей

Attachment: diff.txt added

bug fix + tests

comment:1 Changed 3 years ago by Tim Graham

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

Could you send a pull request to master and include a release note in docs/releases/1.10.1.txt?

comment:2 Changed 3 years ago by Simon Charette

comment:3 Changed 3 years ago by Сергей

Description: modified (diff)

comment:4 Changed 3 years ago by Сергей

Added PR and release notes

comment:5 Changed 3 years ago by Сергей

Owner: changed from nobody to Сергей
Status: newassigned

comment:6 Changed 3 years ago by Sergey Yurchenko

Owner: changed from Сергей to Sergey Yurchenko

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 4e64e3bb:

Fixed #26997 -- Fixed checks crash with empty Meta.default_permissions.

comment:8 Changed 3 years ago by Tim Graham

Summary: crash on empty model permissionsChecks framework crash on empty model Meta.default_permissions

comment:9 Changed 3 years ago by Tim Graham <timograham@…>

In a8b8ef1:

[1.10.x] Fixed #26997 -- Fixed checks crash with empty Meta.default_permissions.

Backport of 4e64e3bb6e96a50b057bc1144fba3efdee7dfc10 from master

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