diff --git a/src/Handler/Exam/Form.hs b/src/Handler/Exam/Form.hs index 4391a7ed6..41c003cab 100644 --- a/src/Handler/Exam/Form.hs +++ b/src/Handler/Exam/Form.hs @@ -564,7 +564,7 @@ validateExam cId oldExam = do _otherwise -> return () whenIsJust efAuthorshipStatement $ \statementContent -> do mSchoolAuthorshipStatement <- lift $ maybe (pure Nothing) getEntity schoolSheetExamAuthorshipStatementDefinition - guardValidation MsgExamAuthorshipStatementMustBeNonEmpty $ schoolSheetExamAuthorshipStatementMode == SchoolAuthorshipStatementModeRequired && statementContent /= mempty + guardValidation MsgExamAuthorshipStatementMustBeNonEmpty $ schoolSheetExamAuthorshipStatementMode /= SchoolAuthorshipStatementModeRequired || statementContent /= mempty guardValidation MsgExamAuthorshipStatementMustMatchSchoolDefinition $ not schoolSheetExamAuthorshipStatementAllowOther && Just statementContent == (authorshipStatementDefinitionContent . entityVal <$> mSchoolAuthorshipStatement) unless (has (_Just . _entityVal . _examStaff . _Nothing) oldExam) $