mirror of
https://github.com/django/django.git
synced 2025-10-09 18:12:39 +00:00
[4.1.x] Fixed #34139 -- Fixed acreate(), aget_or_create(), and aupdate_or_create() methods for related managers.
Bug in58b27e0dbb
. Backport of7b94847e38
from main
This commit is contained in:
parent
8740d2f452
commit
9fb57fcc70
8 changed files with 155 additions and 0 deletions
|
@ -9,3 +9,7 @@ class RelatedModel(models.Model):
|
|||
class SimpleModel(models.Model):
|
||||
field = models.IntegerField()
|
||||
created = models.DateTimeField(default=timezone.now)
|
||||
|
||||
|
||||
class ManyToManyModel(models.Model):
|
||||
simples = models.ManyToManyField("SimpleModel")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue