Skip to content

Commit

Permalink
[GLT-4032] fixed error updating notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
djcooke committed Nov 7, 2023
1 parent eb04daf commit 7ac0455
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changes/fix_updateNotifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Updating notifications failed if any requisitions included supplemental samples that did not have
their own fully defined assay
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,15 @@ protected boolean metricsAvailable(Sample sample, Run run, Map<Long, Assay> assa
String.format("Unexpected metric category: %s", metricCategory));
}
if (sample.getAssayId() == null) {
return false;
// no assay means no metrics, so all are available
return true;
}
Assay assay = assaysById.get(sample.getAssayId());
List<MetricSubcategory> subcategories = assay.getMetricCategories().get(metricCategory);
if (subcategories == null) {
// no metrics defined, so all are available
return true;
}
for (MetricSubcategory subcategory : subcategories) {
if (subcategory.getLibraryDesignCode() != null
&& !subcategory.getLibraryDesignCode().equals(sample.getLibraryDesignCode())) {
Expand Down

0 comments on commit 7ac0455

Please sign in to comment.