mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Explicit None check
This commit is contained in:
parent
9ff2405947
commit
fe8dceceba
1 changed files with 4 additions and 4 deletions
|
@ -125,16 +125,16 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
|
|||
)
|
||||
|
||||
def update_model(self, form, model):
|
||||
if (form.oral_mark and form.oral_mark.data != model.oral_mark) or (
|
||||
form.protocol_mark and form.protocol_mark.data != model.protocol_mark
|
||||
if (form.oral_mark is not None and form.oral_mark.data != model.oral_mark) or (
|
||||
form.protocol_mark is not None and form.protocol_mark.data != model.protocol_mark
|
||||
):
|
||||
model.assistant = current_user.assistant
|
||||
|
||||
ret = super().update_model(form, model)
|
||||
updateSuccessful = super().update_model(form, model)
|
||||
|
||||
model.part_student.checkThenSetFinalPartMark()
|
||||
|
||||
return ret
|
||||
return updateSuccessful
|
||||
else:
|
||||
# Nothing changed
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue