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
6a0fe0c9
Commit
6a0fe0c9
authored
2 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-changes-for-dicom' into 'dev'
ListConverter treats StructureElements See merge request
!70
parents
055ca88c
9a6a07ba
Branches
Branches containing commit
Tags
caosdb-pylib-v0.7.2
caosdb-server-v0.7.2
Tags containing commit
2 merge requests
!91
Release 0.3
,
!70
ListConverter treats StructureElements
Pipeline
#30610
passed
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/converters.py
+2
-0
2 additions, 0 deletions
src/caoscrawler/converters.py
src/caoscrawler/identifiable_adapters.py
+3
-1
3 additions, 1 deletion
src/caoscrawler/identifiable_adapters.py
with
5 additions
and
1 deletion
src/caoscrawler/converters.py
+
2
−
0
View file @
6a0fe0c9
...
@@ -812,6 +812,8 @@ class ListElementConverter(Converter):
...
@@ -812,6 +812,8 @@ class ListElementConverter(Converter):
children
.
append
(
TextElement
(
str
(
index
),
list_element
))
children
.
append
(
TextElement
(
str
(
index
),
list_element
))
elif
isinstance
(
list_element
,
dict
):
elif
isinstance
(
list_element
,
dict
):
children
.
append
(
DictElement
(
str
(
index
),
list_element
))
children
.
append
(
DictElement
(
str
(
index
),
list_element
))
elif
isinstance
(
list_element
,
StructureElement
):
children
.
append
(
list_element
)
else
:
else
:
raise
NotImplementedError
(
raise
NotImplementedError
(
f
"
Unkown type
{
type
(
list_element
)
}
in list element
{
list_element
}
.
"
)
f
"
Unkown type
{
type
(
list_element
)
}
in list element
{
list_element
}
.
"
)
...
...
This diff is collapsed.
Click to expand it.
src/caoscrawler/identifiable_adapters.py
+
3
−
1
View file @
6a0fe0c9
...
@@ -463,7 +463,9 @@ class CaosDBIdentifiableAdapter(IdentifiableAdapter):
...
@@ -463,7 +463,9 @@ class CaosDBIdentifiableAdapter(IdentifiableAdapter):
candidates
=
db
.
execute_query
(
query_string
)
candidates
=
db
.
execute_query
(
query_string
)
if
len
(
candidates
)
>
1
:
if
len
(
candidates
)
>
1
:
raise
RuntimeError
(
raise
RuntimeError
(
f
"
Identifiable was not defined unambigiously.
\n
{
query_string
}
\n
Returned the following
{
candidates
}
.
"
)
f
"
Identifiable was not defined unambigiously.
\n
{
query_string
}
\n
Returned the
"
f
"
following
{
candidates
}
.
"
f
"
Identifiable:
\n
{
identifiable
.
record_type
}{
identifiable
.
properties
}
"
)
if
len
(
candidates
)
==
0
:
if
len
(
candidates
)
==
0
:
return
None
return
None
return
candidates
[
0
]
return
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