Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
ef6b2d58
Commit
ef6b2d58
authored
9 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-1932 : Bugfix on children generator
SVN: 34018
parent
028fffe4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plasmid/source/core-plugins/eln-lims/1/dss/reporting-plugins/newbrowserapi/script.py
+5
-3
5 additions, 3 deletions
.../eln-lims/1/dss/reporting-plugins/newbrowserapi/script.py
with
5 additions
and
3 deletions
plasmid/source/core-plugins/eln-lims/1/dss/reporting-plugins/newbrowserapi/script.py
+
5
−
3
View file @
ef6b2d58
...
...
@@ -395,9 +395,11 @@ def insertUpdateSample(tr, parameters, tableBuilder):
sample
.
setParentSampleIdentifiers
(
sampleParents
);
#Create new sample children
sampleChildrenNewIdentifiers
=
[];
if
sampleChildrenNew
!=
None
:
for
newSampleChild
in
sampleChildrenNew
:
child
=
tr
.
createNewSample
(
newSampleChild
[
"
identifier
"
],
newSampleChild
[
"
sampleTypeCode
"
]);
#Create Sample given his id
sampleChildrenNewIdentifiers
.
append
(
newSampleChild
[
"
identifier
"
]);
child
.
setParentSampleIdentifiers
([
sampleIdentifier
]);
for
key
in
newSampleChild
[
"
properties
"
].
keySet
():
propertyValue
=
unicode
(
newSampleChild
[
"
properties
"
][
key
]);
...
...
@@ -406,11 +408,11 @@ def insertUpdateSample(tr, parameters, tableBuilder):
child
.
setPropertyValue
(
key
,
propertyValue
);
#Add sample children
#Add sample children
that are not newly created
if
sampleChildren
!=
None
:
for
sampleChildIdentifier
in
sampleChildren
:
child
=
getSampleByIdentifierForUpdate
(
tr
,
sampleChildIdentifier
);
#Retrieve Sample
if
child
!
=
None
:
#The new created ones will not be found
if
sampleChildIdentifier
not
in
sampleChild
renNew
Identifier
s
:
child
=
getSampleByIdentifierForUpdate
(
tr
,
sampleChildIdentifier
);
#Retrieve Sample
childParents
=
child
.
getParentSampleIdentifiers
();
childParents
.
add
(
sampleIdentifier
);
child
.
setParentSampleIdentifiers
(
childParents
);
...
...
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