From e0c090dad9ff4d1e5c720fbfa1ff9bb0d2d4df68 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Thu, 2 Feb 2017 20:43:32 +0100 Subject: [PATCH] fix access to accounting data --- billard/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/billard/models.py b/billard/models.py index d0cb5bf..e39fdad 100644 --- a/billard/models.py +++ b/billard/models.py @@ -47,7 +47,7 @@ class Client(models.Model): desk2_prize_ht = models.DecimalField(max_digits=4, decimal_places=2, blank=True, null=True) def accounting_for(self, desk_no): - return Accounting.objects.filter(location=self.location, desk_no=desk_no)[:2][::-1] + return Accounting.objects.filter(location=self.location, client_id=self.id, desk_no=desk_no)[:2][::-1] def accounting_1(self): return self.accounting_for(1)