Return empty value for payment fields when group has no payments

issue10470
review363391002
This commit is contained in:
Sergi Almacellas Abellana committed 2021-05-28 09:06:51 +02:00
1 parent 11e5612fed
commit 728c40c8cc
1 file changed
+1 -1
+1 -1
View File
@@ -148,7 +148,7 @@ class Group(ModelSQL, ModelView):
payment = Payment.__table__()
# initialize result and columns
result = defaultdict(defaultdict)
result = defaultdict(lambda: defaultdict(lambda: None))
columns = [
payment.group.as_('group_id'),
Count(payment.group).as_('payment_count'),