diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-07-15 17:55:28 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-07-15 17:55:28 (GMT) |
commit | babac965abe677148cc5609d2df7079fdccd720e (patch) | |
tree | 160cf21b41fe0c0602655c6ff5d7894a390d5b1b | |
parent | 8a6ce2a5d1d9e029135bb2ea2eb964de6945536c (diff) |
Bug fix #4219: can't continue with empty answer
-rw-r--r-- | CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py b/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py index 594148e..4cf7695 100644 --- a/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py +++ b/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py @@ -208,13 +208,14 @@ class Panel(gtk.Paned): without_answer = [] for question in self.visible_questions(): - active_options = question.widget_obtions.get_active_options() - # TODO: Revisar get_active_options para que funcione con cualquier - # tipo de widget y no diferenciar cuando es TextInput + texto = None + active_options = None if question.pregunta.get("widget_type", None) == "TextInput": - if not question.widget_obtions.get_text().strip(): - active_options = False - if not active_options: + texto = question.widget_obtions.get_text().strip() + else: + active_options = question.widget_obtions.get_active_options() + + if not (active_options or texto): without_answer.append(question) return without_answer |