From abcc8bcf74a86877785c157055ceb0d88402c10d Mon Sep 17 00:00:00 2001 From: Mike Olund Date: Thu, 16 Mar 2017 16:01:12 -0700 Subject: [PATCH] DIV-290 - ignore leading and trailing spaces when determining step completeness --- edivorce/apps/core/utils/user_response.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edivorce/apps/core/utils/user_response.py b/edivorce/apps/core/utils/user_response.py index dc8d7f60..a97a465c 100644 --- a/edivorce/apps/core/utils/user_response.py +++ b/edivorce/apps/core/utils/user_response.py @@ -83,7 +83,7 @@ def is_complete(step, lst): for question in lst: q_id = question['question_id'] value = question['value'] - if value != '[]' and value != '': + if value != '[]' and value.strip() != '': if q_id in required_list: required_list.remove(q_id) elif q_id in conditional_list: @@ -95,7 +95,7 @@ def is_complete(step, lst): # print("H: %s, V: %s|" %(hidden_q_id, key['value'])) if hidden_q_id == 'other_name_you' and not json.loads(key['value'])[0][1]: break - elif not key['value']: + elif not key['value'] or key['value'].strip() == '': break else: key_in_list = True