We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5be9a2 commit 1ba08daCopy full SHA for 1ba08da
ticket/models.py
@@ -31,10 +31,10 @@ def __str__(self):
31
def buyable(self) -> bool:
32
"""잔여 수량이 있는지"""
33
sat_ticket_count = Ticket.objects.filter(
34
- models.Q(ticket_type__day="SAT") & models.Q(ticket_type__day="WEEKEND")
+ models.Q(ticket_type__day="SAT") | models.Q(ticket_type__day="WEEKEND")
35
).count()
36
sun_ticket_count = Ticket.objects.filter(
37
- models.Q(ticket_type__day="SUN") & models.Q(ticket_type__day="WEEKEND")
+ models.Q(ticket_type__day="SUN") | models.Q(ticket_type__day="WEEKEND")
38
39
40
can_buy_sat_ticket = sat_ticket_count < config.CONFERENCE_PARTICIPANT_COUNT_SAT
0 commit comments