Opened 8 years ago

Closed 8 years ago

Last modified 8 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 Сергей 8 years ago.
bug fix + tests

Download all attachments as: .zip

Change History (10)

by Сергей, 8 years ago

Attachment: diff.txt added

bug fix + tests

comment:1 by Tim Graham, 8 years ago

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 by Simon Charette, 8 years ago

comment:3 by Сергей, 8 years ago

Description: modified (diff)

comment:4 by Сергей, 8 years ago

Added PR and release notes

comment:5 by Сергей, 8 years ago

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

comment:6 by Sergey Yurchenko, 8 years ago

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

comment:7 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 4e64e3bb:

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

comment:8 by Tim Graham, 8 years ago

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

comment:9 by Tim Graham <timograham@…>, 8 years ago

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