Skip to content

Commit 9dfb157

Browse files
authored
Save cohort updates and exit immediately (#1805)
* Save cohort updates and exit immediately Signed-off-by: Angelica Ochoa <15623749+ao508@users.noreply.github.com> * Remove screenshot requirement from PR template Removed the requirement for screenshots in the pull request checks. --------- Signed-off-by: Angelica Ochoa <15623749+ao508@users.noreply.github.com>
1 parent bdbdbc4 commit 9dfb157

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Please follow these checks if any changes were made to any classes in the web, s
3636

3737
**Code checks:**
3838
- [ ] Endpoints were tested to ensure their integrity.
39-
- [ ] Screenshots have been provided to demonstrate changes made to the response body JSON schema and/or swagger page.
4039
- [ ] Unit tests were updated in relation to updates to the mocked test data.
4140

4241
If no unit tests were updated or added, then please explain why: [insert details here]

service/src/main/java/org/mskcc/smile/service/impl/CohortCompleteServiceImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public class CohortCompleteServiceImpl implements CohortCompleteService {
4646
public void saveCohort(Cohort cohort, Set<String> sampleIds) throws Exception {
4747
// persist new cohort complete event to the db
4848
cohortCompleteRepository.save(cohort);
49-
if (sampleIds == null) {
50-
LOG.error("No samples saved for cohort: " + cohort.getCohortId());
49+
if (sampleIds == null || sampleIds.isEmpty()) {
50+
LOG.error("No samples saved for cohort: " + cohort.getCohortId()
51+
+ " - persisting cohort to SMILE and exiting.");
52+
return;
5153
}
5254

5355
Map<String, Object> result

0 commit comments

Comments
 (0)