[virtualcommons-svn] commit/vcweb: alllee: fixing round in progress logic, most recent round is now
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2011-06-22 06:55:32
|
1 new changeset in vcweb: http://bitbucket.org/virtualcommons/vcweb/changeset/80c91614de72/ changeset: 80c91614de72 user: alllee date: 2011-06-22 08:55:22 summary: fixing round in progress logic, most recent round is now always the first element in the list since we're using deque.appendleft affected #: 1 file (20 bytes) --- a/vcweb/forestry/views.py Tue Jun 21 23:49:54 2011 -0700 +++ b/vcweb/forestry/views.py Tue Jun 21 23:55:22 2011 -0700 @@ -89,9 +89,8 @@ data.final_number_of_trees = resource_level.value participant_history.appendleft(data) if experiment.is_round_in_progress: - last_round_data = participant_history[-1] - if experiment.current_round == last_round_data.round_configuration: - last_round_data.round_in_progress = True + last_round_data = participant_history[0] + last_round_data.round_in_progress = (experiment.current_round == last_round_data.round_configuration) return participant_history @participant_required Repository URL: https://bitbucket.org/virtualcommons/vcweb/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |