pete = Person.objects.create(name='Pete', age=30)
garfield = Pet.objects.create()
pete.pets.add(garfield)
pete.save()
# To remove every pets
pete.pets.clear()
The last line throws an exception (from neo4django.db.models.relationships line 745):
<Pet:> is not related to <Person: Pete>
I inspected the RelationshipInstance object and it seems that the self._added is an empty list (even if pete.pets.all() has values).
Hi,
taking the same exemple than the doc:
The last line throws an exception (from
neo4django.db.models.relationships
line 745):I inspected the
RelationshipInstance
object and it seems that theself._added
is an empty list (even ifpete.pets.all()
has values).Any clue?
Best!