Skip to content

Commit

Permalink
Fix dev data
Browse files Browse the repository at this point in the history
  • Loading branch information
marksteward committed May 24, 2024
1 parent 654a056 commit 9c62c3e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/base/dev/fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from main import db
from models.user import User
from models.basket import Basket
from models.event_tickets import EventTicket
from models.event_tickets import EventTicket, get_max_rank_for_user
from models.product import PriceTier
from models.payment import StripePayment, BankPayment
from models.cfp import (
Expand Down Expand Up @@ -264,8 +264,8 @@ def create_fake_lottery_tickets(self, users_list: list[User], proposal):
max_ticket_count = 2 if proposal is WorkshopProposal else 5

for user in random.sample(users_list, k=n_lottery_tickets):
db.session.add(
EventTicket.create_ticket(
user, proposal, random.randint(1, max_ticket_count)
)
)
rank = get_max_rank_for_user(user, proposal.type)
db.session.add(EventTicket(
user.id, proposal.id, "entered-lottery", random.randint(1, max_ticket_count), rank
))

0 comments on commit 9c62c3e

Please sign in to comment.