From 1b719b331e42ee332c0bcccd8436ff3e0a278c24 Mon Sep 17 00:00:00 2001 From: Scilly-guy Date: Fri, 24 Jan 2025 18:02:21 +0000 Subject: [PATCH] only get distinct billing accounts --- billing/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/billing/models.py b/billing/models.py index 1f5ccce..d936f57 100644 --- a/billing/models.py +++ b/billing/models.py @@ -217,6 +217,6 @@ def get_billing_accounts_suitable_for_booking(user, booking_end): q = BillingAccount.objects.filter( Q(owner=user) | Q(members=user, billingaccountmember__can_make_bookings=True), ~Q(approved_at=None), - ) + ).distinct() return q