mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Fixed #28543 -- Prevented ManyToManyField.value_from_object() from being lazy.
Previously, it was a QuerySet which could reevaluate to a new value if the model's data changes. This is inconsistent with other Field.value_from_object() methods. This allows reverting the fix in the admin for refs #27998.
This commit is contained in:
parent
ec6481246a
commit
e5bd585c6e
6 changed files with 41 additions and 18 deletions
|
|
@ -360,6 +360,10 @@ class AllFieldsModel(models.Model):
|
|||
gr = GenericRelation(DataModel)
|
||||
|
||||
|
||||
class ManyToMany(models.Model):
|
||||
m2m = models.ManyToManyField('self')
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue