Skip to content

Commit

Permalink
[fix practice_add_new_report] Add a condition to check if the practic…
Browse files Browse the repository at this point in the history
…e supervisor is selected. (#111)

* [fix practice_add_new_report bug]
A new condition is added to check if the thesis supervisor is selected.

* fix the condition to None check

* Fix formatting

---------

Co-authored-by: iakov <iakov@users.noreply.github.com>
  • Loading branch information
true-real-michael and iakov committed Mar 6, 2024
1 parent 2cd65d2 commit 70a9074
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flask_se_practice.py
Expand Up @@ -415,6 +415,11 @@ def practice_add_new_report(current_thesis):
"Слишком короткое описание дальнейших планов, напишите подробнее!",
category="error",
)
elif current_thesis.supervisor_id is None:
flash(
'Научный руководитель не найден, выберите научного руководителя в разделе "Выбор темы"!',
category="error",
)
else:
new_report = ThesisReport(
was_done=was_done,
Expand Down

0 comments on commit 70a9074

Please sign in to comment.