parse date for display

This commit is contained in:
2016-11-07 17:11:42 +01:00
parent 509f3e0275
commit df0ca31687

View File

@@ -1,4 +1,5 @@
import logging
from dateutil import parser
from flask import Blueprint, render_template, request, current_app
import flask
@@ -66,6 +67,9 @@ def view_task(project, attract_props, task_id):
task = pillarsdk.Node.find(task_id, api=api)
node_type = project.get_node_type(node_type_task['name'])
if task.properties.due_date:
task.properties.due_date = parser.parse('%s' % task.properties.due_date)
# Fetch project users so that we can assign them tasks
if 'PUT' in task.allowed_methods:
users = project.get_users(api=api)