Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
01714b3a
Commit
01714b3a
authored
2 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Fix empty_diff for special properties
parent
b479d64d
No related branches found
No related tags found
2 merge requests
!79
Release 0.10.0
,
!76
F fix empty diff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosdb/apiutils.py
+5
-1
5 additions, 1 deletion
src/caosdb/apiutils.py
with
5 additions
and
1 deletion
src/caosdb/apiutils.py
+
5
−
1
View file @
01714b3a
...
...
@@ -353,10 +353,14 @@ def empty_diff(old_entity: Entity, new_entity: Entity, compare_referenced_record
olddiff
,
newdiff
=
compare_entities
(
old_entity
,
new_entity
,
compare_referenced_records
)
for
diff
in
[
olddiff
,
newdiff
]:
for
key
in
diff
:
for
key
in
[
"
parents
"
,
"
properties
"
]
:
if
len
(
diff
[
key
])
>
0
:
# There is a difference somewhere in the diff
return
False
for
key
in
SPECIAL_ATTRIBUTES
:
if
key
in
diff
and
diff
[
key
]:
# There is a difference in at least one special attribute
return
False
# all elements of the two diffs were empty
return
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment