File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
src/main/java/ch/ethz/seb/sps/server Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -554,6 +554,7 @@ private void deleteSessionScreenshots(final SessionRecord sessionRecord) {
554554 .build ()
555555 .execute ();
556556
557+
557558 // then all screenshots
558559 this .screenshotDAO
559560 .deleteAllForSession (sessionRecord .getUuid (), screenShotPKs )
@@ -734,17 +735,15 @@ public Result<Boolean> hasAnySessionData(Collection<Long> groupIds) {
734735 .build ()
735736 .execute ();
736737
737- if (sessionIds == null || sessionIds .isEmpty ()) {
738- return false ;
739- }
740-
741- Long dataNum = this .screenshotDataRecordMapper
742- .countByExample ()
743- .where (ScreenshotDataRecordDynamicSqlSupport .id , isIn (sessionIds ))
744- .build ()
745- .execute ();
738+ return sessionIds != null && !sessionIds .isEmpty ();
746739
747- return dataNum != null && dataNum .intValue () != 0 ;
740+ // Long dataNum = this.screenshotDataRecordMapper
741+ // .countByExample()
742+ // .where(ScreenshotDataRecordDynamicSqlSupport.id, isIn(sessionIds))
743+ // .build()
744+ // .execute();
745+ //
746+ // return dataNum != null && dataNum.intValue() != 0;
748747 });
749748 }
750749
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ public Exam create(
101101 produces = MediaType .APPLICATION_JSON_VALUE )
102102
103103 public Collection <EntityKey > requestDelete (@ PathVariable final String modelId ) {
104+ // TODO this should never block here do this in background with balk action
104105 if (!this .sessionService .hasAnySessionDataForExam (modelId )) {
105106 return super .hardDelete (modelId );
106107 } else {
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public Group create(
125125 consumes = MediaType .APPLICATION_FORM_URLENCODED_VALUE ,
126126 produces = MediaType .APPLICATION_JSON_VALUE )
127127 public Collection <EntityKey > requestDelete (@ PathVariable (name = API .PARAM_MODEL_ID ) final String groupUUID ) {
128-
128+ // TODO this should never block here do this in background with balk action
129129 if (!this .sessionService .hasAnySessionDataForGroup (groupUUID )) {
130130 return super .hardDelete (groupUUID );
131131 } else {
You can’t perform that action at this time.
0 commit comments