Skip to content

Commit b2e8037

Browse files
committed
Null check
1 parent ac47736 commit b2e8037

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SivStudies/src/org/labkey/sivstudies/etl/SubjectScopedSelect.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,10 @@ private List<String> getSubjects(Logger log)
453453
}
454454
else
455455
{
456-
Container source = ContainerManager.getForPath(_settings.get(Settings.subjectSourceContainerPath.name()));
456+
Container source = _settings.get(Settings.subjectSourceContainerPath.name()) == null ? _containerUser.getContainer() : ContainerManager.getForPath(_settings.get(Settings.subjectSourceContainerPath.name()));
457457
if (source == null)
458458
{
459-
source = _containerUser.getContainer();
459+
throw new IllegalStateException("Unknown subjectSourceContainerPath: " + _settings.get(Settings.subjectSourceContainerPath.name()));
460460
}
461461

462462
if (!source.hasPermission(_containerUser.getUser(), ReadPermission.class))

0 commit comments

Comments
 (0)