Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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 Crawler
Commits
1af0ce52
Commit
1af0ce52
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
correct var name
parent
6790903a
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!123
REL: Release v0.6.0
,
!115
Use cached_get_entity_by
Pipeline
#36357
failed
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caoscrawler/crawl.py
+1
-1
1 addition, 1 deletion
src/caoscrawler/crawl.py
unittests/test_tool.py
+1
-1
1 addition, 1 deletion
unittests/test_tool.py
with
2 additions
and
2 deletions
src/caoscrawler/crawl.py
+
1
−
1
View file @
1af0ce52
...
@@ -733,7 +733,7 @@ class Crawler(object):
...
@@ -733,7 +733,7 @@ class Crawler(object):
parent_updates
=
db
.
Container
()
parent_updates
=
db
.
Container
()
for
entity
in
to_be_updated
:
for
entity
in
to_be_updated
:
old_entity
=
cached_get_entity_by
(
id
=
entity
.
id
)
old_entity
=
cached_get_entity_by
(
e
id
=
entity
.
id
)
# Check whether the parents have been changed and add them if missing
# Check whether the parents have been changed and add them if missing
# in the old entity:
# in the old entity:
...
...
This diff is collapsed.
Click to expand it.
unittests/test_tool.py
+
1
−
1
View file @
1af0ce52
...
@@ -588,7 +588,7 @@ def test_replace_entities_with_ids(crawler):
...
@@ -588,7 +588,7 @@ def test_replace_entities_with_ids(crawler):
assert
a
.
get_property
(
"
C
"
).
value
==
[
12345
,
233324
]
assert
a
.
get_property
(
"
C
"
).
value
==
[
12345
,
233324
]
def
mock_get_entity_by
(
id
=
None
,
name
=
None
):
def
mock_get_entity_by
(
e
id
=
None
,
name
=
None
):
if
id
is
not
None
:
if
id
is
not
None
:
candidates
=
[
el
for
el
in
list
(
full_data
.
values
())
if
el
.
id
==
id
]
candidates
=
[
el
for
el
in
list
(
full_data
.
values
())
if
el
.
id
==
id
]
if
len
(
candidates
)
>
0
:
if
len
(
candidates
)
>
0
:
...
...
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