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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Crawler
Commits
5bcefcca
Commit
5bcefcca
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: do not allow Identifiable for nodes without registered ident
parent
28b1b816
No related branches found
No related tags found
2 merge requests
!178
FIX: #96 Better error output for crawl.py script.
,
!167
Sync Graph
Pipeline
#50843
passed with warnings
1 year ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/identifiable_adapters.py
+55
-60
55 additions, 60 deletions
src/caoscrawler/identifiable_adapters.py
with
55 additions
and
60 deletions
src/caoscrawler/identifiable_adapters.py
+
55
−
60
View file @
5bcefcca
...
...
@@ -288,20 +288,16 @@ startswith: bool, optional
Identifiable, the identifiable for record.
"""
registered_identifiable
=
se
.
registered_identifiable
property_name_list_A
=
[]
property_name_list_B
=
[]
identifiable_props
=
{}
name
=
None
# TODO
# if registered_identifiable is None:
# raise ValueError("no register_identifiable")
if
se
.
registered_identifiable
is
None
:
raise
ValueError
(
"
no register_identifiable
"
)
if
registered_identifiable
is
not
None
:
# fill the values:
for
prop
in
registered_identifiable
.
properties
:
for
prop
in
se
.
registered_identifiable
.
properties
:
if
prop
.
name
==
"
name
"
:
name
=
se
.
name
continue
...
...
@@ -316,7 +312,7 @@ startswith: bool, optional
if
len
(
identifiable_backrefs
)
==
0
:
raise
MissingReferencingEntityError
(
f
"
Could not find referencing entities of type(s):
{
prop
.
value
}
\n
"
f
"
for registered identifiable:
\n
{
registered_identifiable
}
\n
"
f
"
for registered identifiable:
\n
{
se
.
registered_identifiable
}
\n
"
f
"
There were
{
len
(
identifiable_backrefs
)
}
referencing entities to choose from.
\n
"
f
"
This error can also occur in case of merge conflicts in the referencing entities.
"
)
...
...
@@ -361,8 +357,7 @@ startswith: bool, optional
return
Identifiable
(
record_id
=
se
.
id
,
path
=
se
.
path
,
record_type
=
(
registered_identifiable
.
parents
[
0
].
name
if
registered_identifiable
else
None
),
record_type
=
se
.
registered_identifiable
.
parents
[
0
].
name
,
name
=
name
,
properties
=
identifiable_props
,
backrefs
=
[
e
.
id
for
e
in
identifiable_backrefs
]
...
...
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