Skip to content

Commit

Permalink
always check worker status w.r.t. current assignmentId
Browse files Browse the repository at this point in the history
  • Loading branch information
gureckis committed Feb 9, 2017
1 parent 0027258 commit dd89fe8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion psiturk/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ def check_worker_status():
return jsonify(**resp)
else:
worker_id = request.args['workerId']
assignment_id = request.args['assignmentId']
try:
part = Participant.query.\
filter(Participant.workerid == worker_id).one()
filter(Participant.workerid == worker_id).\
filter(Participant.assignmentid == assignment_id).one()
status = part.status
except exc.SQLAlchemyError:
status = NOT_ACCEPTED
Expand Down

0 comments on commit dd89fe8

Please sign in to comment.