Skip to content

Commit

Permalink
Merge pull request #2988 from betagouv/2987-purchase-synthesis
Browse files Browse the repository at this point in the history
Fix de la charte des achats
  • Loading branch information
alemangui authored Sep 13, 2023
2 parents 9e51ae5 + 3a3c4bb commit 1262de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/views/purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def complete_diag_data(purchases, data):
other_labels_characteristics.append(characteristic)
# Non-EGAlim totals: contains no labels or only one or more of other_labels
non_egalim_purchases = purchase_family.filter(
Q(characteristics__contained_by=other_labels_characteristics) | Q(characteristics__len=0)
Q(characteristics__contained_by=(other_labels_characteristics + [""])) | Q(characteristics__len=0)
).distinct()
key = "value_" + family.lower() + "_non_egalim"
data[key] = non_egalim_purchases.aggregate(total=Sum("price_ht"))["total"] or 0
Expand Down

0 comments on commit 1262de6

Please sign in to comment.