Skip to content

Commit 0837104

Browse files
committed
Add filtering not refunded in ticket type
1 parent 1ba08da commit 0837104

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ticket/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def buyable(self) -> bool:
3232
"""잔여 수량이 있는지"""
3333
sat_ticket_count = Ticket.objects.filter(
3434
models.Q(ticket_type__day="SAT") | models.Q(ticket_type__day="WEEKEND")
35-
).count()
35+
).filter(is_refunded=False).count()
3636
sun_ticket_count = Ticket.objects.filter(
3737
models.Q(ticket_type__day="SUN") | models.Q(ticket_type__day="WEEKEND")
38-
).count()
38+
).filter(is_refunded=False).count()
3939

4040
can_buy_sat_ticket = sat_ticket_count < config.CONFERENCE_PARTICIPANT_COUNT_SAT
4141
can_buy_sun_ticket = sun_ticket_count < config.CONFERENCE_PARTICIPANT_COUNT_SUN

0 commit comments

Comments
 (0)