mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
[1.5.x] Fixed #23431 -- Allowed inline and hidden references to admin fields.
This fixes a regression introduced by the53ff096982security fix. Thanks to @a1tus for the report and Tim for the review. refs #23329. Backport of342ccbdfrom master
This commit is contained in:
@@ -696,3 +696,15 @@ class ChildOfReferer(ParentWithFK):
|
||||
class M2MReference(models.Model):
|
||||
ref = models.ManyToManyField('self')
|
||||
|
||||
# Models for #23431
|
||||
class ReferencedByInline(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class InlineReference(models.Model):
|
||||
fk = models.ForeignKey(ReferencedByInline, related_name='hidden+')
|
||||
|
||||
|
||||
class InlineReferer(models.Model):
|
||||
refs = models.ManyToManyField(InlineReference)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user