Skip to content
Snippets Groups Projects
Commit d881d464 authored by brinn's avatar brinn
Browse files

[BIS-137] Fix an issue of EoDSQL with return SQL NULL values.

SVN: 26211
parent f9d95fd9
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ public class SampleListPredicate extends AbstractSpacePredicate<List<Sample>> ...@@ -85,7 +85,7 @@ public class SampleListPredicate extends AbstractSpacePredicate<List<Sample>>
// - technical id // - technical id
// - permanent id // - permanent id
// - space code // - space code
// - space identifier // - identifier
final List<Long> ids = new ArrayList<Long>(samples.size()); final List<Long> ids = new ArrayList<Long>(samples.size());
final List<String> permIds = new ArrayList<String>(samples.size()); final List<String> permIds = new ArrayList<String>(samples.size());
for (Sample sample : samples) for (Sample sample : samples)
...@@ -122,9 +122,9 @@ public class SampleListPredicate extends AbstractSpacePredicate<List<Sample>> ...@@ -122,9 +122,9 @@ public class SampleListPredicate extends AbstractSpacePredicate<List<Sample>>
} }
for (Long spaceId : getSampleSpaceIds(ids, permIds)) for (Long spaceId : getSampleSpaceIds(ids, permIds))
{ {
if (spaceId == null || spaceId == 0) if (spaceId == null)
{ {
continue; // Shared samples will return a spaceId of null (or 0 in EoDSQL). continue; // Shared samples will return a spaceId of null.
} }
final Status status = final Status status =
evaluate(person, allowedRoles, spaceId); evaluate(person, allowedRoles, spaceId);
......
...@@ -91,9 +91,9 @@ public class ScreeningPlateListReadOnlyPredicate extends ...@@ -91,9 +91,9 @@ public class ScreeningPlateListReadOnlyPredicate extends
{ {
for (Long spaceId : getSampleSpaceIds(permIds)) for (Long spaceId : getSampleSpaceIds(permIds))
{ {
if (spaceId == null || spaceId == 0) if (spaceId == null)
{ {
continue; // Shared samples will return a spaceId of null (or 0 in EoDSQL). continue; // Shared samples will return a spaceId of null.
} }
final Status status = final Status status =
evaluate(person, allowedRoles, spaceId); evaluate(person, allowedRoles, spaceId);
......
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