Skip to content

Commit

Permalink
Fix duplicate billing accounts in booking list(#96)
Browse files Browse the repository at this point in the history
Fixes duplicate billing accounts being shown to the user when making a
booking when their billing account contains multiple additional members.

Fixes #51

Co-authored-by: Scilly-guy <[email protected]>
  • Loading branch information
Scilly-guy and Scilly-guy authored Jan 26, 2025
1 parent 128413b commit dcb6694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion billing/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,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

0 comments on commit dcb6694

Please sign in to comment.