Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/org/labkey/targetedms/TargetedMSManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,18 @@ private TargetedMSManager()
private static final Cache<Container, List<QCMetricConfiguration>> _metricCache = CacheManager.getBlockingCache(1000, TimeUnit.HOURS.toMillis(1), "Enabled QC metric configs",
(c, argument) ->
{
if (!(argument instanceof TargetedMSSchema schema))
{
throw new IllegalArgumentException("Argument must be a TargetedMSSchema but was " + argument);
}

if (getFolderType(schema.getContainer()) != TargetedMSService.FolderType.QC)
{
return Collections.emptyList();
}

try
{
TargetedMSSchema schema = (TargetedMSSchema) argument;
TableInfo metricsTable = schema.getTableOrThrow("qcMetricsConfig", null);
List<QCMetricConfiguration> metrics = new TableSelector(metricsTable, null, new Sort(FieldKey.fromParts("Name"))).getArrayList(QCMetricConfiguration.class);

Expand Down
Loading