Skip to content

Commit

Permalink
[fix] return 403 when editing teacher profile
Browse files Browse the repository at this point in the history
  • Loading branch information
bojieli committed Jul 4, 2024
1 parent eeee3e4 commit 1b36cc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/teacher.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def edit_profile(teacher_id):
form = TeacherProfileForm(formdata=request.form, obj=teacher)
errors = []
if current_user.is_blocked_now:
return jsonify(ok=False, message="您已经被禁言")
abort(403)
if teacher.info_locked:
errors.append(_("Teacher info is locked, please contact administrator to unlock"))
elif form.validate_on_submit():
Expand Down

0 comments on commit 1b36cc2

Please sign in to comment.