refactor counter

This commit is contained in:
thomas girod
2024-07-21 10:44:43 +02:00
parent d9531838f2
commit 82d3791859
7 changed files with 98 additions and 139 deletions

View File

@ -41,7 +41,7 @@ def write_log(instance, operation_type):
session_token = session.get("counter_token", None)
if session_token:
counter = Counter.objects.filter(token=session_token).first()
if counter and len(counter.get_barmen_list()) > 0:
if counter and len(counter.barmen_list) > 0:
return counter.get_random_barman()
# Get the current logged user if not from a counter