fix(backend): Fouten in de testen resulterend uit de aanpassingen opgelost.
This commit is contained in:
		
							parent
							
								
									7b79348985
								
							
						
					
					
						commit
						03fa7c7b14
					
				
					 4 changed files with 80 additions and 13 deletions
				
			
		|  | @ -42,11 +42,21 @@ export class SubmissionRepository extends DwengoEntityRepository<Submission> { | |||
|     } | ||||
| 
 | ||||
|     public async findAllSubmissionsForGroup(group: Group): Promise<Submission[]> { | ||||
|         return this.find({ onBehalfOf: group }); | ||||
|         return this.find( | ||||
|             { onBehalfOf: group }, | ||||
|             { | ||||
|                 populate: ["onBehalfOf.members"] | ||||
|             } | ||||
|         ); | ||||
|     } | ||||
| 
 | ||||
|     public async findAllSubmissionsForStudent(student: Student): Promise<Submission[]> { | ||||
|         return this.find({ submitter: student }); | ||||
|         return this.find( | ||||
|             { submitter: student }, | ||||
|             { | ||||
|                 populate: ["onBehalfOf.members"] | ||||
|             } | ||||
|         ); | ||||
|     } | ||||
| 
 | ||||
|     public async deleteSubmissionByLearningObjectAndSubmissionNumber(loId: LearningObjectIdentifier, submissionNumber: number): Promise<void> { | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'; | ||||
| import {Collection, Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property} from '@mikro-orm/core'; | ||||
| import { Class } from '../classes/class.entity.js'; | ||||
| import { Group } from './group.entity.js'; | ||||
| import { Language } from '@dwengo-1/common/util/language'; | ||||
|  | @ -35,5 +35,5 @@ export class Assignment { | |||
|         entity: () => Group, | ||||
|         mappedBy: 'assignment', | ||||
|     }) | ||||
|     groups!: Group[]; | ||||
|     groups!: Collection<Group>; | ||||
| } | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger