1
0
Fork 0

Fixes tests and incorrect class method reference

This commit is contained in:
Mouse Reeve 2023-05-22 06:39:23 -07:00
parent b3a519c082
commit affaf3d0ba
2 changed files with 25 additions and 9 deletions

View file

@ -97,7 +97,7 @@ def suspend_user(request, user_id, report_id=None):
# this isn't a full deletion, so we don't want to tell the world
user.save(broadcast=False)
models.ReportAction.record_action(report_id, USER_SUSPENSION, request.user)
models.Report.record_action(report_id, USER_SUSPENSION, request.user)
return redirect_to_referer(request, "settings-user", user.id)
@ -111,7 +111,7 @@ def unsuspend_user(request, user_id, report_id=None):
# this isn't a full deletion, so we don't want to tell the world
user.save(broadcast=False)
models.ReportAction.record_action(report_id, USER_UNSUSPENSION, request.user)
models.Report.record_action(report_id, USER_UNSUSPENSION, request.user)
return redirect_to_referer(request, "settings-user", user.id)
@ -134,7 +134,7 @@ def moderator_delete_user(request, user_id, report_id=None):
user.delete()
# make a note of the fact that we did this
models.ReportAction.record_action(report_id, USER_DELETION, request.user)
models.Report.record_action(report_id, USER_DELETION, request.user)
return redirect_to_referer(request, "settings-user", user.id)
form.errors["password"] = ["Invalid password"]