diff --git a/frontend/src/store/modules/submission-notes.ts b/frontend/src/store/modules/submission-notes.ts index 9a4fe315bbacb17f17fb465c989c66f5837c1a9a..ea23fe7b9c310e02f57b53c3902ed6fa732f7160 100644 --- a/frontend/src/store/modules/submission-notes.ts +++ b/frontend/src/store/modules/submission-notes.ts @@ -51,7 +51,7 @@ function initialState (): SubmissionNotesState { hasOrigFeedback: false, origFeedback: { pk: 0, - score: 0, + score: undefined, isFinal: false, feedbackLines: {} }, @@ -158,9 +158,9 @@ const submissionNotes: Module<SubmissionNotesState, RootState> = { if (Object.keys(state.updatedFeedback.feedbackLines || {}).length > 0) { feedback.feedbackLines = state.updatedFeedback.feedbackLines } - if (state.origFeedback.score === null && state.updatedFeedback.score === null) { + if (state.origFeedback.score === undefined && state.updatedFeedback.score === undefined) { throw new Error('You need to give a score.') - } else if (state.updatedFeedback.score !== null) { + } else if (state.updatedFeedback.score !== undefined) { feedback.score = state.updatedFeedback.score } await dispatch('deleteComments') diff --git a/util/importer.py b/util/importer.py index bbd4c706e13ff79223921386c7489d8979410256..a1ed1e617ac375fbd9ffa96c83da892abdbf72f8 100644 --- a/util/importer.py +++ b/util/importer.py @@ -166,7 +166,8 @@ def call_loader(func: Callable) -> None: def file_suffix_to_lang_name(suffix: str) -> str: suffix2name = { 'hs': 'haskell', - 's': 'mipsasm' + 's': 'mipsasm', + 'asm': 'mipsasm' } if suffix not in suffix2name: return suffix