Skip to content

Commit 1ba08da

Browse files
committed
Fix checking ticket type buyable
1 parent d5be9a2 commit 1ba08da

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
@@ -31,10 +31,10 @@ def __str__(self):
3131
def buyable(self) -> bool:
3232
"""잔여 수량이 있는지"""
3333
sat_ticket_count = Ticket.objects.filter(
34-
models.Q(ticket_type__day="SAT") & models.Q(ticket_type__day="WEEKEND")
34+
models.Q(ticket_type__day="SAT") | models.Q(ticket_type__day="WEEKEND")
3535
).count()
3636
sun_ticket_count = Ticket.objects.filter(
37-
models.Q(ticket_type__day="SUN") & models.Q(ticket_type__day="WEEKEND")
37+
models.Q(ticket_type__day="SUN") | models.Q(ticket_type__day="WEEKEND")
3838
).count()
3939

4040
can_buy_sat_ticket = sat_ticket_count < config.CONFERENCE_PARTICIPANT_COUNT_SAT

0 commit comments

Comments
 (0)