Commit e70ddffd48798c6a42483559845acc43814f9cc6
1 parent
3488c13e
Exists in
master
and in
1 other branch
Fixed bug with empty old strategy.
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/web/survey.py
... | ... | @@ -183,8 +183,11 @@ class Survey: |
183 | 183 | old_strategies = [dirs for root, dirs, files in |
184 | 184 | os.walk(os.path.join(self.submissions_dir, |
185 | 185 | request.user_id))] |
186 | - print "OLD Strategies", old_strategies[0] | |
187 | - strategies = [s for s in self.strategies if s not in old_strategies[0]] | |
186 | + if old_strategies: | |
187 | + strategies = [s for s in self.strategies if s not in old_strategies[0]] | |
188 | + print "OLD Strategies", old_strategies[0] | |
189 | + else: | |
190 | + strategies = self.strategies | |
188 | 191 | print "LEFT",strategies |
189 | 192 | if not strategies: |
190 | 193 | return render.thanks(user_id) | ... | ... |