allow obj_pk on Changes with action=create
This commit is contained in:
parent
0c675ce5aa
commit
fae4c70050
1 changed files with 2 additions and 0 deletions
|
@ -331,6 +331,8 @@ class Change(models.Model):
|
||||||
return self.existing_object_pk
|
return self.existing_object_pk
|
||||||
if self.created_object_id is not None:
|
if self.created_object_id is not None:
|
||||||
return 'c'+str(self.created_object_id)
|
return 'c'+str(self.created_object_id)
|
||||||
|
if self.action == 'create':
|
||||||
|
return 'c' + str(self.pk)
|
||||||
raise TypeError('existing_model_pk or created_object have to be set.')
|
raise TypeError('existing_model_pk or created_object have to be set.')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue