Commit a102b5e0 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Add support for other object types in Diff Tool

parent fc24e53e
...@@ -109,8 +109,16 @@ class PortalPatch: ...@@ -109,8 +109,16 @@ class PortalPatch:
""" """
Returns a Json patch with deep diff extensions Returns a Json patch with deep diff extensions
""" """
#It's easier to ask forgiveness than permission
try:
src = self.old_value._asDict() src = self.old_value._asDict()
except AttributeError:
src = self.old_value
try:
dst = self.new_value._asDict() dst = self.new_value._asDict()
except AttributeError:
dst = self.new_value
ddiff = DeepDiff(src, dst, ignore_order=True, verbose_level=0) ddiff = DeepDiff(src, dst, ignore_order=True, verbose_level=0)
return ddiff return ddiff
......
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