Skip to content

Commit

Permalink
manually del weakref functions to make sure they are disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakadus committed Jun 17, 2024
1 parent 342519c commit 7dafe56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions evap/rewards/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def grant_reward_points_after_delete(instance, action, reverse, pk_set, **_kwarg
for semester in Semester.objects.filter(courses__evaluations__pk__in=pk_set):
granting, __ = grant_reward_points_if_eligible(user, semester)
if granting:
assert not grantings
grantings = [granting]
else:
# a participant got removed from an evaluation
Expand Down
3 changes: 2 additions & 1 deletion evap/staff/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ def notify_reward_points(grantings, **_kwargs):
"editable": editable,
"questionnaires_with_answers_per_contributor": questionnaires_with_answers_per_contributor,
}
del notify_reward_points # cleanup receiver
return render(request, "staff_evaluation_form.html", template_data)


Expand Down Expand Up @@ -2228,7 +2229,7 @@ def notify_reward_points(grantings, **_kwargs):
for message in form.remove_messages:
messages.warning(request, message)
return redirect("staff:user_index")

del notify_reward_points # cleanup receiver
return render(
request,
"staff_user_form.html",
Expand Down

0 comments on commit 7dafe56

Please sign in to comment.