diff --git a/billard/templatetags/display_client.py b/billard/templatetags/display_client.py index a5f2d0d..262e865 100644 --- a/billard/templatetags/display_client.py +++ b/billard/templatetags/display_client.py @@ -13,6 +13,7 @@ def display_client(client, desk_no): if len(desks) == 0: return '' desk = desks[0] + loc = desk.client.location if not desk.enabled: return '' alert = 'alert-success' @@ -25,8 +26,8 @@ def display_client(client, desk_no): start=a.time_from, end=datetime.now(), pph=desk.prize, - hh_start=desk.client.location.happy_hour_start, - hh_end=desk.client.location.happy_hour_end, + hh_start=loc.happy_hour_start, + hh_end=loc.happy_hour_end, pphh=desk.prize_hh, ) prize = '{0:.2f}'.format(prize) @@ -35,6 +36,16 @@ def display_client(client, desk_no): html = '