Skip to content
Snippets Groups Projects
Commit 5317baaa authored by Daniele Nicolodi's avatar Daniele Nicolodi
Browse files

timetracking: Handle no data available for the requested month

Not emitting any record if no data is availablre for the requested
month seems more useful than failing with an exception.
parent b207a070
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ class Client:
data['uiDdlMonth'] = value
break
else:
raise ValueError
return None
# POST ReportFunction.aspx
r = self.session.post(r.url, data=data)
......@@ -399,6 +399,8 @@ def timesheet(client, month, n, v):
for month in months:
data = client.timesheet(month)
if not data:
continue
timesheet = Timesheet(month, data)
for day, booking in timesheet:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment