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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user