Skip to content

Commit

Permalink
fixing a non-breaking bug where the closepopup.html template was atte…
Browse files Browse the repository at this point in the history
…mpting to load when using own ad server but debugging
  • Loading branch information
deargle committed Jun 11, 2016
1 parent d1d5074 commit 4b2f638
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions psiturk/experiment.py
Expand Up @@ -582,6 +582,10 @@ def debug_complete():
raise ExperimentError('improper_inputs')
else:
unique_id = request.args['uniqueId']
if unique_id[:5] == "debug":
debug_mode = True
else:
debug_mode = False
try:
user = Participant.query.\
filter(Participant.uniqueid == unique_id).one()
Expand All @@ -592,8 +596,7 @@ def debug_complete():
except:
raise ExperimentError('error_setting_worker_complete')
else:
use_psiturk_ad_server = CONFIG.getboolean('Shell Parameters', 'use_psiturk_ad_server')
if use_psiturk_ad_server:
if debug_mode:
return render_template('complete.html')
else: # send them back to mturk.
return render_template('closepopup.html')
Expand Down

0 comments on commit 4b2f638

Please sign in to comment.