[4.1.x] Fixed #34139 -- Fixed acreate(), aget_or_create(), and aupdate_or_create() methods for related managers.

Bug in 58b27e0dbb.

Backport of 7b94847e38 from main
This commit is contained in:
Jon Janzen 2022-11-04 15:22:32 +01:00 committed by Mariusz Felisiak
parent 8740d2f452
commit 9fb57fcc70
8 changed files with 155 additions and 0 deletions

View file

@ -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")