summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/wizards.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 5cbc857c3..499f008b4 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -572,7 +572,14 @@ class Wizard(IshtarWizard):
if data_key not in current_data:
current_data[data_key] = {}
current_data = current_data[data_key]
- current_data[data_keys[-1]] = dct.pop(k)
+ value = dct.pop(k)
+ if isinstance(value, datetime.datetime):
+ value = value.strftime('%Y-%m-%dT%H:%M:%S')
+ elif isinstance(value, datetime.date):
+ value = value.strftime('%Y-%m-%d')
+ elif value is None:
+ value = ''
+ current_data[data_keys[-1]] = value
continue
vals = k.split('__')