Skip to content
Snippets Groups Projects
Commit 0d628bdf authored by anttil's avatar anttil
Browse files

BIS-51 / SP-139: Bugfix: Unnecessary calls to...

BIS-51 / SP-139: Bugfix: Unnecessary calls to RelationshipService.assignSampleToContainer() and RelationshipService.removeSampleFromContainer()

SVN: 25983
parent ac8067d6
No related branches found
No related tags found
No related merge requests found
...@@ -210,6 +210,16 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi ...@@ -210,6 +210,16 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi
final SamplePE containerPE = final SamplePE containerPE =
tryGetValidNotContainedSample(containerIdentifier, sampleIdentifier, defaultSpace); tryGetValidNotContainedSample(containerIdentifier, sampleIdentifier, defaultSpace);
if (samplePE.getContainer() == null && containerPE == null)
{
return;
}
if (samplePE.getContainer() != null && samplePE.getContainer().equals(containerPE))
{
return;
}
if (containerPE == null) if (containerPE == null)
{ {
relationshipService.removeSampleFromContainer(session, IdentifierHelper relationshipService.removeSampleFromContainer(session, IdentifierHelper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment