Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #402 from SELab-2/perf_fix_maybe
Browse files Browse the repository at this point in the history
Perf fix maybe
  • Loading branch information
EmmaVandewalle authored May 23, 2024
2 parents 0bdf7fd + b06aa0d commit ffb4b8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/dataloaders/ProjectsTeacherLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ export async function LoadProjectsForTeacher(filter_on_current: boolean = false,

const allGroups: (Group[]|undefined)[] = (await groupPromises)
const groups: Group[][] = allGroups.filter(group => group !== undefined) as Group[][]
const groupsR = await Promise.all(groups.map(groupArray => Promise.all(groupArray.map(group => apiFetch<Backend_submission>(`/groups/${group.group_id}/submission`)))));
const amount_of_submissions: number[] = []
for (const groupArray of groups) {
for (const groupArray of groupsR) {
let amount = 0
for (const group of groupArray) {
for (const submissionData of groupArray) {
try {
const submissionData = await apiFetch<Backend_submission>(`/groups/${group.group_id}/submission`);
if (!submissionData.ok){
continue
}
Expand Down

0 comments on commit ffb4b8e

Please sign in to comment.