Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
610a15b3
Commit
610a15b3
authored
Aug 03, 2018
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DiffTool: Do not display diff for empty data comparison even if data is of different types
parent
075b2356
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.DiffTool.py
...tTemplateItem/portal_components/document.erp5.DiffTool.py
+7
-0
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.DiffTool.py
View file @
610a15b3
...
@@ -160,6 +160,13 @@ class PortalPatch:
...
@@ -160,6 +160,13 @@ class PortalPatch:
for
val
in
diff_tree_list
:
for
val
in
diff_tree_list
:
new_val
=
{}
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
)
diff
=
val
.
additional
.
get
(
'diff'
,
None
)
# If there is diff in additional property, save it separately
# If there is diff in additional property, save it separately
if
diff
:
if
diff
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment