Skip to content
Snippets Groups Projects
Commit 170a7e0e authored by felmer's avatar felmer
Browse files

remove duplicated log messages

SVN: 20565
parent 5c054a68
No related branches found
No related tags found
No related merge requests found
...@@ -117,12 +117,15 @@ class DatasetMappingResolver ...@@ -117,12 +117,15 @@ class DatasetMappingResolver
{ {
return sampleCodeOrLabel; return sampleCodeOrLabel;
} }
Boolean sampleExistsAndBelongsToExperiment = null;
if (mapping.getExperimentName() == null) if (mapping.getExperimentName() == null)
{ {
// The main purpose of this checks is to ensure that sample with the given code exists. // The main purpose of this checks is to ensure that sample with the given code exists.
// If it is not a case, we will try to check if the specified sample label is unique (in // If it is not a case, we will try to check if the specified sample label is unique (in
// all experiments). // all experiments).
if (sampleExistsAndBelongsToExperiment(mapping, sampleCodeOrLabel, log)) sampleExistsAndBelongsToExperiment =
sampleExistsAndBelongsToExperiment(mapping, sampleCodeOrLabel, log);
if (sampleExistsAndBelongsToExperiment)
{ {
return sampleCodeOrLabel; return sampleCodeOrLabel;
} }
...@@ -139,7 +142,12 @@ class DatasetMappingResolver ...@@ -139,7 +142,12 @@ class DatasetMappingResolver
} else if (samples.size() == 0) } else if (samples.size() == 0)
{ {
// try to assume that the sample code, not name, has been provided // try to assume that the sample code, not name, has been provided
if (sampleExistsAndBelongsToExperiment(mapping, sampleCodeOrLabel, log)) if (sampleExistsAndBelongsToExperiment == null)
{
sampleExistsAndBelongsToExperiment =
sampleExistsAndBelongsToExperiment(mapping, sampleCodeOrLabel, log);
}
if (sampleExistsAndBelongsToExperiment)
{ {
return sampleCodeOrLabel; return sampleCodeOrLabel;
} else } else
......
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