diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index 2688e44..08f8560 100644 Binary files a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc and b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc differ diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py index 1e4c872..9e3a4a4 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -598,7 +598,8 @@ def loadaccounttime(user): if(len(workday.breaks.all()) > 0): for ele in workday.breaks.all(): - sum_break += (ele.end - ele.start).seconds + if ele.end != None and ele.start != None: + sum_break += (ele.end - ele.start).seconds finalsum = ((workday.end - workday.start).seconds - sum_break) hastowork = datetime.timedelta(hours=workday.target)