Commit 32e59c67 authored by Jérome Perrin's avatar Jérome Perrin

CapacityProjectSpreadsheet: set a 6 month due date only if date is due date is not set

If due date has an incorrect format it is better to fail than to hide
the error and produce wrong results.
parent 3e9f4a0d
......@@ -25,11 +25,11 @@ class CapacityProjectSpreadsheet(plugin.InputPreparationPlugin):
projectId=projectData[row][0]
orderDate=strptime(projectData[row][1], '%Y/%m/%d')
orderDate=(orderDate-now).days
try:
if projectData[row][2]:
dueDate=strptime(projectData[row][2], '%Y/%m/%d')
dueDate=(dueDate-now).days
# if no due date is given set it to 180 (about 6 months)
except ValueError:
else:
dueDate=180
assemblySpaceRequirement=float(projectData[row][3])
capacityRequirementDict={}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment