Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
3cb82095
Commit
3cb82095
authored
4 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Added an additional check for ID > 0
parent
6752497d
No related branches found
No related tags found
2 merge requests
!21
Release v0.4.0
,
!18
fix importance bug
Pipeline
#8942
passed
4 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/caosdb/server/jobs/Job.java
+8
-9
8 additions, 9 deletions
src/main/java/org/caosdb/server/jobs/Job.java
with
8 additions
and
9 deletions
src/main/java/org/caosdb/server/jobs/Job.java
+
8
−
9
View file @
3cb82095
...
...
@@ -561,25 +561,24 @@ public abstract class Job {
*/
protected
EntityInterface
resolve
(
final
EntityInterface
entity
)
throws
EntityWasNotUniqueException
{
EntityInterface
resolvedParent
=
null
;
// if the parent has an id>0, it is to be a valid entity.
EntityInterface
resolvedEntity
=
null
;
if
(!
entity
.
hasId
()
&&
entity
.
hasName
())
{
resolved
Parent
=
getEntityByName
(
entity
.
getName
());
if
(
resolved
Parent
==
null
)
{
resolved
Entity
=
getEntityByName
(
entity
.
getName
());
if
(
resolved
Entity
==
null
)
{
final
Integer
eid
=
retrieveValidIDByName
(
entity
.
getName
());
entity
.
setId
(
eid
);
}
}
if
(
entity
.
hasId
())
{
// get
par
ent from container
resolved
Parent
=
getEntityById
(
entity
.
getId
());
if
(
resolved
Parent
==
null
)
{
resolved
Parent
=
retrieveValidEntity
(
entity
.
getId
());
// get ent
ity
from container
resolved
Entity
=
getEntityById
(
entity
.
getId
());
if
(
resolved
Entity
==
null
&&
entity
.
getId
()
>
0
)
{
resolved
Entity
=
retrieveValidEntity
(
entity
.
getId
());
}
}
return
resolved
Parent
;
return
resolved
Entity
;
}
/**
...
...
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