Commit 610a15b3 authored by Ayush Tiwari's avatar Ayush Tiwari

DiffTool: Do not display diff for empty data comparison even if data is of different types

parent 075b2356
......@@ -160,6 +160,13 @@ class PortalPatch:
for val in diff_tree_list:
new_val = {}
# In case both the old and new value are one of empty data type or None or
# an instance of 'deepdiff NotPresent', there is no need to show the empty
# diff, hence its better to continue
if ((not val.t1 or isinstance(val.t1, deepdiff.helper.NotPresent)) and
(not val.t2 or isinstance(val.t2, deepdiff.helper.NotPresent))):
continue
diff = val.additional.get('diff', None)
# If there is diff in additional property, save it separately
if diff:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment