Skip to content

Commit

Permalink
Revert to default order limit
Browse files Browse the repository at this point in the history
  • Loading branch information
aviupadhyayula committed Jan 4, 2025
1 parent 58f36f3 commit b4882c9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
18 changes: 18 additions & 0 deletions backend/clubs/migrations/0119_alter_ticketsettings_order_limit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.4 on 2025-01-04 01:23

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("clubs", "0118_remove_event_ticket_drop_time_and_more"),
]

operations = [
migrations.AlterField(
model_name="ticketsettings",
name="order_limit",
field=models.IntegerField(blank=True, default=10, null=True),
),
]
2 changes: 1 addition & 1 deletion backend/clubs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ class TicketSettings(models.Model):
event = models.OneToOneField(
Event, on_delete=models.CASCADE, related_name="ticket_settings"
)
order_limit = models.IntegerField(null=True, blank=True)
order_limit = models.IntegerField(null=True, blank=True, default=10)
drop_time = models.DateTimeField(null=True, blank=True)
fee_charged_to_buyer = models.BooleanField(default=False)

Expand Down
3 changes: 0 additions & 3 deletions backend/tests/clubs/test_ticketing.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,6 @@ def test_add_to_cart_twice_accumulates(self):
self.assertEqual(cart.tickets.filter(type="premium").count(), 2, cart.tickets)

def test_add_to_cart_order_limit_exceeded(self):
self.ticket_settings.order_limit = 10
self.ticket_settings.save()

self.client.login(username=self.user1.username, password="test")

tickets_to_add = {
Expand Down

0 comments on commit b4882c9

Please sign in to comment.