fix(core): dont attempt to access parent_object if 'None' during history save
!27
This commit is contained in:
@ -85,8 +85,10 @@ class SaveHistory(models.Model):
|
||||
|
||||
if hasattr(self, 'parent_object'):
|
||||
|
||||
item_parent_pk = self.parent_object.pk
|
||||
item_parent_class = self.parent_object._meta.model_name
|
||||
if self.parent_object:
|
||||
|
||||
item_parent_pk = self.parent_object.pk
|
||||
item_parent_class = self.parent_object._meta.model_name
|
||||
|
||||
|
||||
item_pk = self.pk
|
||||
|
Reference in New Issue
Block a user