Fixed strange behavior on make_diff function (possible bugfix)

remotes/origin/enhancement/email-actions
Andrey Antukh 2014-09-13 15:17:36 +02:00
parent a3b0d13e46
commit f4516ff435
1 changed files with 6 additions and 0 deletions

View File

@ -33,4 +33,10 @@ def make_diff(first:dict, second:dict, not_found_value=None) -> dict:
if key not in first:
diff[key] = (not_found_value, second[key])
# Remove A -> A changes that usually happens with None -> None
for key, value in list(diff.items()):
frst, scnd = value
if frst == scnd:
del diff[key]
return diff