1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #28517 -- Fixed admin delete confirmation view crash when related models don't have a delete permission.

This commit is contained in:
Paulo
2017-08-22 19:48:55 -04:00
committed by Tim Graham
parent 5d5a2bd299
commit d1286a8a68
4 changed files with 51 additions and 12 deletions

View File

@@ -582,6 +582,14 @@ class ReadablePizza(Pizza):
proxy = True
# No default permissions are created for this model and both name and toppings
# are readonly for this model's admin.
class ReadOnlyPizza(Pizza):
class Meta:
proxy = True
default_permissions = ()
class Album(models.Model):
owner = models.ForeignKey(User, models.SET_NULL, null=True, blank=True)
title = models.CharField(max_length=30)