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
6a2c5300
Commit
6a2c5300
authored
1 month ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
DOCS: add comments for clarification
parent
900cb2ba
No related branches found
Branches containing commit
No related tags found
1 merge request
!182
Draft: FIX: do not replace prop during merge
Pipeline
#62420
canceled
1 month ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/linkahead/apiutils.py
+3
-0
3 additions, 0 deletions
src/linkahead/apiutils.py
with
3 additions
and
0 deletions
src/linkahead/apiutils.py
+
3
−
0
View file @
6a2c5300
...
...
@@ -587,8 +587,10 @@ def merge_entities(entity_a: Entity,
raise
NotImplementedError
()
for
attribute
in
(
"
datatype
"
,
"
unit
"
,
"
value
"
):
# attribute is in r2
if
(
attribute
in
diff_r2
[
"
properties
"
][
key
]
and
diff_r2
[
"
properties
"
][
key
][
attribute
]
is
not
None
):
# but not in r1
if
(
attribute
not
in
diff_r1
[
"
properties
"
][
key
]
or
diff_r1
[
"
properties
"
][
key
][
attribute
]
is
None
):
setattr
(
entity_a
.
get_property
(
key
),
attribute
,
...
...
@@ -596,6 +598,7 @@ def merge_entities(entity_a: Entity,
elif
force
:
setattr
(
entity_a
.
get_property
(
key
),
attribute
,
diff_r2
[
"
properties
"
][
key
][
attribute
])
# attribute in r1 but no "force"
else
:
raise_error
=
True
if
merge_id_with_resolved_entity
is
True
and
attribute
==
"
value
"
:
...
...
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