Prevent error when task_type is given but None.

This commit is contained in:
2016-11-10 09:34:02 +01:00
parent 08c82688e7
commit 1134bb82a0

View File

@@ -65,7 +65,9 @@ class TaskManager(object):
task.name = fields.pop('name')
task.description = fields.pop('description')
task.properties.status = fields.pop('status')
task.properties.task_type = fields.pop('task_type', '').strip() or None
task.properties.task_type = fields.pop('task_type', None)
if isinstance(task.properties.task_type, basestring):
task.properties.task_type = task.properties.task_type.strip() or None
due_date = fields.pop('due_date', None)
if due_date: