Sunday, August 2, 2015

Django M2M with Oracle database FieldDoesNotExist error

Hello Django community.

I have two Django models Foo and Bar that have a  ManyToMany relation:

Class Foo(models.model):    ...    bars = models.ManyToManyField('Bar', related_name='foos')

somewhere in the code, i do direct assignment to replace the relation with a new list:

foo_object.bars = [bar_object_list]

but i get:

FieldDoesNotExist: Foo_bars has no field named None

I use Django 1.8.3 with Oracle 12c

any help would be highly appreciated

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f47b9dc-1474-42fb-a98c-87fbea80e533%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment