Revised the code in the transaction model in the accounting application.

This commit is contained in:
依瑪貓 2020-07-23 22:33:33 +08:00
parent 6453cd4b8e
commit 43d51a5519

View File

@ -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