diff --git a/backend/src/api/controllers/result.ts b/backend/src/api/controllers/result.ts index fd113bb4d..d8a338cd2 100644 --- a/backend/src/api/controllers/result.ts +++ b/backend/src/api/controllers/result.ts @@ -87,6 +87,23 @@ export async function updateTags( await ResultDAL.updateTags(uid, resultId, tagIds); const result = await ResultDAL.getResult(uid, resultId); + + if (!result.difficulty) { + result.difficulty = "normal"; + } + if (!result.language) { + result.language = "english"; + } + if (!result.funbox) { + result.funbox = "none"; + } + if (!result.lazyMode) { + result.lazyMode = false; + } + if (!result.punctuation) { + result.punctuation = false; + } + const user = await getUser(uid, "update tags"); const tagPbs = await checkIfTagPb(uid, user, result); return new MonkeyResponse("Result tags updated", {