diff --git a/backend/src/services/assignments.ts b/backend/src/services/assignments.ts index e96b8dd8..afa4c759 100644 --- a/backend/src/services/assignments.ts +++ b/backend/src/services/assignments.ts @@ -103,7 +103,6 @@ function hasDuplicates(arr: string[]): boolean { export async function putAssignment(classid: string, id: number, assignmentData: Partial): Promise { const assignment = await fetchAssignment(classid, id); - if (assignmentData.groups) { if (hasDuplicates(assignmentData.groups.flat() as string[])) { throw new BadRequestException('Student can only be in one group'); @@ -124,7 +123,7 @@ export async function putAssignment(classid: string, id: number, assignmentData: await groupRepository.save(newGroup); }) ); - } catch(e: unknown) { + } catch (e: unknown) { if (e instanceof ForeignKeyConstraintViolationException || e instanceof PostgreSqlExceptionConverter) { throw new ConflictException('Cannot update assigment with questions or submissions'); } else { diff --git a/frontend/src/views/assignments/TeacherAssignment.vue b/frontend/src/views/assignments/TeacherAssignment.vue index c860fc04..653ed1ca 100644 --- a/frontend/src/views/assignments/TeacherAssignment.vue +++ b/frontend/src/views/assignments/TeacherAssignment.vue @@ -149,7 +149,7 @@ const message = err.response?.data?.error || err.message || t("unknownError"); showSnackbar(t("failed") + ": " + message, "error"); }, - } + }, ); }