2👍
✅
After much toil and struggle, it turns out the answer to all my problems was, in fact, one single line.
The solution for this particular problem was to change
task_id = request.POST['task_id']
to
task_id = request.session['task_id']
in poll_state
.
Source:stackexchange.com