diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index 5433c82..2be237d 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 34fcb03..8ce065f 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -73,7 +73,13 @@ def getmesscounter(user): @register.simple_tag def getWorkDayHistory(workday): workday = Workday.objects.get(pk=workday.pk) - return workday.history.first() + + if len(workday.history.all()) > 1: + return workday.history.first() + else: + return None + + #return workday.history.first() # Last Absence @register.simple_tag