US #55: Custom fields - Fix asome error when generate diff in history model
parent
be6e03226b
commit
ffe04f2bab
|
@ -204,8 +204,8 @@ class HistoryEntry(models.Model):
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
}
|
}
|
||||||
|
|
||||||
oldcustattrs = {x["id"]:x for x in self.diff["custom_attributes"][0]}
|
oldcustattrs = {x["id"]:x for x in self.diff["custom_attributes"][0] or []}
|
||||||
newcustattrs = {x["id"]:x for x in self.diff["custom_attributes"][1]}
|
newcustattrs = {x["id"]:x for x in self.diff["custom_attributes"][1] or []}
|
||||||
|
|
||||||
for aid in set(tuple(oldcustattrs.keys()) + tuple(newcustattrs.keys())):
|
for aid in set(tuple(oldcustattrs.keys()) + tuple(newcustattrs.keys())):
|
||||||
if aid in oldcustattrs and aid in newcustattrs:
|
if aid in oldcustattrs and aid in newcustattrs:
|
||||||
|
|
Loading…
Reference in New Issue