Skip to content

Commit

Permalink
Convert 'None' into an empty string; otherwise, we will ask task to s…
Browse files Browse the repository at this point in the history
…et various fields to the string value None.
  • Loading branch information
coddingtonbear committed Feb 9, 2014
1 parent 9031179 commit 14eb7c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion taskw/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def encode_task_experimental(task):
if 'tags' in task:
task['tags'] = ','.join(task['tags'])
for k in task:
if isinstance(task[k], datetime.datetime):
if task[k] is None:
task[k] = ''
elif isinstance(task[k], datetime.datetime):
if not task[k].tzinfo:
# Dates not having timezone information should be
# assumed to be in local time
Expand Down

0 comments on commit 14eb7c4

Please sign in to comment.