Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Commit

Permalink
fix inverted add_participant test
Browse files Browse the repository at this point in the history
- restart vcweb before reloading nginx / redis
  • Loading branch information
alee committed Apr 5, 2016
1 parent 3a453b1 commit 08fd769
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def deploy(vcs_branch_dict):
if confirm("Run database migrations?"):
_virtualenv(sudo, '%(python)s manage.py migrate' % env, user=env.deploy_user)
_virtualenv(sudo, '%(python)s manage.py collectstatic' % env, user=env.deploy_user)
execute(reload_uwsgi)
sudo_chain(
'chmod -R ug+rw .',
'find %(static_root)s %(virtualenv_path)s -type d -exec chmod a+x {} \;' % env,
Expand All @@ -261,4 +262,3 @@ def deploy(vcs_branch_dict):
'chown -R %(deploy_user)s:%(deploy_group)s . %(static_root)s %(virtualenv_path)s' % env,
_restart_command(),
pty=True)
execute(reload_uwsgi)
2 changes: 1 addition & 1 deletion vcweb/core/subjectpool/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def add_participant(request, pk=None):
participant = get_object_or_404(Participant.objects.select_related('user'), user__email=participant_email)
es = get_object_or_404(ExperimentSession, pk=pk)
# First check that the experiment session has already been completed
if es.scheduled_end_date < datetime.now():
if es.scheduled_end_date > datetime.now():
logger.debug("%s tried to add participant %s to pending experiment session %s - ignoring",
request.user, participant, pk)
return JsonResponse({'success': False, 'error': "You can't manually add a participant to a pending experiment session."})
Expand Down

0 comments on commit 08fd769

Please sign in to comment.