Fixed the _find_order_holes() utility in the accounting application.

This commit is contained in:
依瑪貓 2020-07-21 18:55:04 +08:00
parent bbfe9e7892
commit e0e2815c34

View File

@ -912,7 +912,7 @@ def _find_order_holes(records):
holes = [x["date"] for x in Transaction.objects
.values("date")
.annotate(count=Count("ord"), max=Max("ord"))
.filter(Q(count=F("max")))]\
.filter(~Q(count=F("max")))]\
+ [x["date"] for x in Transaction.objects
.values("date", "ord")
.annotate(count=Count("sn"))