From 43d51a5519044583291b034a216bb07f07ec7514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 23 Jul 2020 22:33:33 +0800 Subject: [PATCH] Revised the code in the transaction model in the accounting application. --- accounting/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/accounting/models.py b/accounting/models.py index 4dace04..5f8f108 100644 --- a/accounting/models.py +++ b/accounting/models.py @@ -136,8 +136,7 @@ class Transaction(models.Model): def has_many_same_day(self): """whether there are more than one transactions at this day, so that the user can sort their orders. """ - return Transaction.objects.filter( - date=self.date).count() > 1 + return Transaction.objects.filter(date=self.date).count() > 1 _has_order_hole = None