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
28cd1a9a
Commit
28cd1a9a
authored
4 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-8787 : Position validation (ongoing work)
parent
a7749f85
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
openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/services/as-eln-lims-api/script.py
+4
-6
4 additions, 6 deletions
...-plugins/eln-lims/1/as/services/as-eln-lims-api/script.py
with
4 additions
and
6 deletions
openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/services/as-eln-lims-api/script.py
+
4
−
6
View file @
28cd1a9a
...
...
@@ -81,8 +81,8 @@ def isValidStoragePositionToInsertUpdate(context, parameters):
searchCriteriaStorageRack
=
SampleSearchCriteria
();
searchCriteriaStorageRack
.
withType
().
withCode
().
thatEquals
(
"
STORAGE_POSITION
"
);
searchCriteriaStorageRack
.
withProperty
(
"
$STORAGE_POSITION.STORAGE_CODE
"
).
thatEquals
(
storageCode
);
#
searchCriteriaStorageRack.withProperty("$STORAGE_POSITION.STORAGE_RACK_ROW").thatEquals(storageRackRow);
#
searchCriteriaStorageRack.withProperty("$STORAGE_POSITION.STORAGE_RACK_COLUMN").thatEquals(storageRackColumn);
searchCriteriaStorageRack
.
with
Number
Property
(
"
$STORAGE_POSITION.STORAGE_RACK_ROW
"
).
thatEquals
(
int
(
storageRackRow
)
)
;
searchCriteriaStorageRack
.
with
Number
Property
(
"
$STORAGE_POSITION.STORAGE_RACK_COLUMN
"
).
thatEquals
(
int
(
storageRackColumn
)
)
;
searchCriteriaStorageRackResults
=
context
.
applicationService
.
searchSamples
(
sessionToken
,
searchCriteriaStorageRack
,
fetchOptions
).
getObjects
();
storageRackBoxes
=
{
storageBoxName
};
for
sample
in
searchCriteriaStorageRackResults
:
...
...
@@ -92,15 +92,13 @@ def isValidStoragePositionToInsertUpdate(context, parameters):
raise
UserFailureException
(
"
Number of boxes in rack exceeded, use an existing box.
"
);
# 5. IF $STORAGE.STORAGE_VALIDATION_LEVEL >= BOX_POSITION
print
"
-----------> BOX_POSITION
"
if
storageValidationLevel
==
"
BOX_POSITION
"
:
for
storageBoxSubPosition
in
storageBoxPosition
.
split
(
"
"
):
print
"
-----------> SUB BOX_POSITION
"
+
storageBoxSubPosition
searchCriteriaStorageBoxPosition
=
SampleSearchCriteria
();
searchCriteriaStorageBoxPosition
.
withType
().
withCode
().
thatEquals
(
"
STORAGE_POSITION
"
);
searchCriteriaStorageBoxPosition
.
withProperty
(
"
$STORAGE_POSITION.STORAGE_CODE
"
).
thatEquals
(
storageCode
);
#
searchCriteriaStorageBoxPosition.withProperty("$STORAGE_POSITION.STORAGE_RACK_ROW").thatEquals(storageRackRow);
#
searchCriteriaStorageBoxPosition.withProperty("$STORAGE_POSITION.STORAGE_RACK_COLUMN").thatEquals(storageRackColumn);
searchCriteriaStorageBoxPosition
.
with
Number
Property
(
"
$STORAGE_POSITION.STORAGE_RACK_ROW
"
).
thatEquals
(
int
(
storageRackRow
)
)
;
searchCriteriaStorageBoxPosition
.
with
Number
Property
(
"
$STORAGE_POSITION.STORAGE_RACK_COLUMN
"
).
thatEquals
(
int
(
storageRackColumn
)
)
;
searchCriteriaStorageBoxPosition
.
withProperty
(
"
$STORAGE_POSITION.STORAGE_BOX_NAME
"
).
thatEquals
(
storageBoxName
);
searchCriteriaStorageBoxPosition
.
withProperty
(
"
$STORAGE_POSITION.STORAGE_BOX_POSITION
"
).
thatContains
(
storageBoxSubPosition
);
searchCriteriaStorageBoxResults
=
context
.
applicationService
.
searchSamples
(
sessionToken
,
searchCriteriaStorageBoxPosition
,
fetchOptions
).
getObjects
();
...
...
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