Fixed if condition with duration property which can be None
This commit is contained in:
parent
8103c09b81
commit
1d1d72d45a
@ -58,7 +58,8 @@ class Overview(TemplateView):
|
||||
duration = timedelta()
|
||||
|
||||
for item in items:
|
||||
if not item.closed and len(item.duration) > 0:
|
||||
if not item.closed and (item.duration is not None
|
||||
and len(item.duration) > 0):
|
||||
duration_list = item.duration.split(':')
|
||||
duration += timedelta(hours=int(duration_list[0]),
|
||||
minutes=int(duration_list[1]))
|
||||
|
Loading…
Reference in New Issue
Block a user