I have the same problem, looks like it's a bug:
https://code.djangoproject.com/ticket/18896
On Friday, 31 August 2012 18:55:39 UTC-4, Matt Long wrote:
>
> Bump?
>
> Almost exactly 4 years later, I've ran into this exact same issue in
> Django 1.4. Attempting to use get_or_create through a ManyTo
Bump?
Almost exactly 4 years later, I've ran into this exact same issue in Django
1.4. Attempting to use get_or_create through a ManyToMany field results in
an integrity error if the object already exists but is not yet associated
with the parent object. To use the OP's example, if a Tag with n
I'm having problems using get_or_create with a ManyToManyField and I'm
not sure whether the problem is me or Django.
I have two models:
class Tag(models.Model):
name = models.CharField(max_length=256, unique=True)
class Thing(models.Model):
name = models.CharField(max_length=256)
ta
3 matches
Mail list logo