From f4516ff4355026404be4ef8b46578b2936e739c9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 13 Sep 2014 15:17:36 +0200 Subject: [PATCH] Fixed strange behavior on make_diff function (possible bugfix) --- taiga/base/utils/diff.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/taiga/base/utils/diff.py b/taiga/base/utils/diff.py index cff9b15e..3d4f0aa8 100644 --- a/taiga/base/utils/diff.py +++ b/taiga/base/utils/diff.py @@ -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