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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
a224c787
Commit
a224c787
authored
Apr 03, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: support deepdiff 6.7.1
parent
57055be5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.DiffTool.py
...onentTemplateItem/portal_components/tool.erp5.DiffTool.py
+10
-3
No files found.
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.DiffTool.py
View file @
a224c787
...
...
@@ -27,6 +27,13 @@
#
##############################################################################
import
six
# pylint:disable=import-error,no-name-in-module
if
six
.
PY3
:
from
collections.abc
import
Set
else
:
from
collections
import
Set
# pylint:enable=import-error,no-name-in-module
import
difflib
import
warnings
try
:
...
...
@@ -144,7 +151,7 @@ class PortalPatch(Explicit):
# Flatten the list of DiffValues
for
key
,
subset
in
tree_diff
.
items
():
if
isinstance
(
subset
,
s
et
):
if
isinstance
(
subset
,
S
et
):
sublist
=
list
(
subset
)
for
item
in
sublist
:
# XXX: This is important as the subsets with iterable item removed
...
...
@@ -192,9 +199,9 @@ class PortalPatch(Explicit):
else
:
old_value
=
val
.
t1
new_value
=
val
.
t2
if
(
val
.
t1
==
None
)
or
isinstance
(
val
.
t1
,
deepdiff
.
helper
.
NotPresent
):
if
(
val
.
t1
is
None
)
or
isinstance
(
val
.
t1
,
deepdiff
.
helper
.
NotPresent
):
old_value
=
''
if
(
val
.
t2
==
None
)
or
isinstance
(
val
.
t2
,
deepdiff
.
helper
.
NotPresent
):
if
(
val
.
t2
is
None
)
or
isinstance
(
val
.
t2
,
deepdiff
.
helper
.
NotPresent
):
new_value
=
''
# Deepdiff doesn't creates diff for anything other than string, thus for all other cases,
...
...
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