fix(backend): Falende testen gerepareerd.

This commit is contained in:
Gerald Schmittinger 2025-04-08 10:25:30 +02:00
parent 3c3a1d89c6
commit fc675710b4
7 changed files with 34 additions and 14 deletions

View file

@ -82,12 +82,19 @@ export class SubmissionRepository extends DwengoEntityRepository<Submission> {
}
public async findAllSubmissionsForStudent(student: Student): Promise<Submission[]> {
return this.find(
const result = await this.find(
{ submitter: student },
{
populate: ["onBehalfOf.members"]
populate: [
"onBehalfOf.members"
]
}
);
// Workaround: For some reason, without this MikroORM generates an UPDATE query with a syntax error in some tests
this.em.clear();
return result;
}
public async deleteSubmissionByLearningObjectAndSubmissionNumber(loId: LearningObjectIdentifier, submissionNumber: number): Promise<void> {