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

Commit

Permalink
use a more sensible var name
Browse files Browse the repository at this point in the history
  • Loading branch information
moh-moola committed Jul 30, 2018
1 parent 59c4235 commit cf6ffa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions molo/surveys/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def clean(self):
'Options: a True and False'),
)
elif data['field_type'] in VALID_SKIP_LOGIC:
choice_max_length = 0
choices_length = 0
for i, logic in enumerate(data['skip_logic']):
if not logic.value['choice']:
self.add_stream_field_error(
Expand All @@ -261,9 +261,9 @@ def clean(self):
_('This field is required.'),
)
else:
choice_max_length += len(logic.value['choice'])
choices_length += len(logic.value['choice'])

if choice_max_length > CHARACTER_COUNT_CHOICE_LIMIT:
if choices_length > CHARACTER_COUNT_CHOICE_LIMIT:
err = 'The combined choices\' maximum characters ' \
'limit has been exceeded ({max_limit} '\
'character(s)).'
Expand Down

0 comments on commit cf6ffa5

Please sign in to comment.