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
5376694a
Commit
5376694a
authored
2 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
FIX: added check for None values in identified cache
parent
4e9d33d1
No related branches found
No related tags found
2 merge requests
!71
REL: RElease v0.2.0
,
!59
Fix hash function
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/identified_cache.py
+4
-1
4 additions, 1 deletion
src/caoscrawler/identified_cache.py
with
4 additions
and
1 deletion
src/caoscrawler/identified_cache.py
+
4
−
1
View file @
5376694a
...
@@ -53,7 +53,9 @@ def _value_representation(value):
...
@@ -53,7 +53,9 @@ def _value_representation(value):
# to allow the special case of Files as values of properties.
# to allow the special case of Files as values of properties.
# We need to review the completeness of all the cases here, as the cache
# We need to review the completeness of all the cases here, as the cache
# is crucial for correct identification of insertion and updates.
# is crucial for correct identification of insertion and updates.
if
isinstance
(
value
,
db
.
File
):
if
value
is
None
:
return
"
None
"
elif
isinstance
(
value
,
db
.
File
):
return
str
(
value
.
path
)
return
str
(
value
.
path
)
elif
isinstance
(
value
,
db
.
Entity
):
elif
isinstance
(
value
,
db
.
Entity
):
if
value
.
id
is
not
None
:
if
value
.
id
is
not
None
:
...
@@ -66,6 +68,7 @@ def _value_representation(value):
...
@@ -66,6 +68,7 @@ def _value_representation(value):
or
isinstance
(
value
,
datetime
)):
or
isinstance
(
value
,
datetime
)):
return
str
(
value
)
return
str
(
value
)
else
:
else
:
breakpoint
()
raise
ValueError
(
f
"
Unknown datatype of the value:
{
value
}
"
)
raise
ValueError
(
f
"
Unknown datatype of the value:
{
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