Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLT-4032] fixed error updating notifications #161

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
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
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