Added unicode support

This commit is contained in:
David Taylor
2016-03-16 15:15:12 +00:00
parent 1b6ce32deb
commit f0a3c968a7

View File

@@ -67,8 +67,8 @@ def model_compare(oldObj, newObj, excluded_keys=[]):
@property
def diff(self):
oldText = str(self.display_value(self._old)) or ""
newText = str(self.display_value(self._new)) or ""
oldText = unicode(self.display_value(self._old)) or ""
newText = unicode(self.display_value(self._new)) or ""
dmp = diff_match_patch()
diffs = dmp.diff_main(oldText, newText)
dmp.diff_cleanupSemantic(diffs)