Skip to content

Commit eb0ef2e

Browse files
authored
Merge pull request #74 from fc5y/fix-contest-materials
fix: routes/contests: do not overwrite materials with empty array
2 parents 749a55d + 1e90e58 commit eb0ef2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/routes/contests/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ async function updateContest(req: Request, res: Response, next: NextFunction) {
246246
start_time: body.start_time,
247247
duration: body.duration,
248248
can_enter: body.can_enter,
249-
materials: materialsToDatabaseFormat(body.materials),
249+
materials: body.materials && materialsToDatabaseFormat(body.materials),
250250
},
251251
});
252252

0 commit comments

Comments
 (0)