From 8c3bb23d141d06cad4bd2f685aaec3041d3b23c5 Mon Sep 17 00:00:00 2001 From: Doug Markant Date: Mon, 17 Sep 2012 12:21:52 -0400 Subject: [PATCH] fixed bug when subject is already found in the database --- app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 993538cce..d9dca6813 100644 --- a/app.py +++ b/app.py @@ -343,9 +343,10 @@ def start_exp(): part = Participant( hitId, myip, assignmentId, workerId, subj_cond, subj_counter) db_session.add( part ) db_session.commit() - + elif numrecs==1: - part = matches[0].subjid + + part = matches[0] if part.status>=STARTED: # in experiment (or later) can't restart at this point raise ExperimentError( 'already_started_exp' ) else: