summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit/reporting.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyfirstaidkit/reporting.py')
-rw-r--r--pyfirstaidkit/reporting.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pyfirstaidkit/reporting.py b/pyfirstaidkit/reporting.py
index 67f2269..88a7114 100644
--- a/pyfirstaidkit/reporting.py
+++ b/pyfirstaidkit/reporting.py
@@ -88,8 +88,17 @@ class ConfigQuestion(Question):
self.title = title
self.description = description
self.mode = mode
- self.items = map(lambda x: (x[0], x[1], x[2], x[3],
- re.compile("^("+x[4]+")$"), x[5]), items)
+
+ def _fillrow(x):
+ if mode == 2:
+ model = x[6]
+ else:
+ model = None
+
+ return (x[0], x[1], x[2], x[3],
+ re.compile("^("+x[4]+")$"), x[5], model)
+
+ self.items = map(_fillrow, items)
class ChoiceQuestion(Question):
"""A question that offers multiple options.