-
-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Description
From example:
from django.db import models
from polymorphic.models import PolymorphicModel
class ModelA(PolymorphicModel):
field1 = models.CharField(max_length=10)
class ModelB(ModelA):
field2 = models.CharField(max_length=10)
class ModelC(ModelB):
field3 = models.CharField(max_length=10)
I set in object .id and the .pk of the object to None before saving:
>>> o = ModelB.objects.first()
>>> o.field1 = 'new val' # leave field2 unchanged
>>> o.pk = None
>>> o.id = None
>>> o.save()
It works.
But this method does not work if i coping ModelC (because modela_ptr not set to None).
What should I do?
toabi and vickyliin
Metadata
Metadata
Assignees
Labels
No labels