for obj in serializers deserialize json data obj object id None obj ob

1
2
3
4
>>> for obj in serializers.deserialize('json', data):
... obj.object.id = None
... obj.object.pk = None
... obj.save()