feat: republish endpoints + polling + multi-ticket via N-rows model #16
1 changed files with 2 additions and 0 deletions
fix: propagate CreateTicket.user_id to the persisted ticket row
api_ticket_create accepted user_id in the CreateTicket request body
(its root_validator even requires user_id XOR name+email), but
dropped it on the way to crud.create_ticket — tickets ended up
with user_id = NULL and the new GET /tickets/user/{id} endpoint
returned an empty list for every webapp buyer.
Pull data.user_id alongside name/email and forward it to
create_ticket. Backfilling existing rows is left to the operator
(deployment-specific data fix); fresh purchases starting from this
commit are correctly attributed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
commit
36568d3eee
|
|
@ -513,6 +513,7 @@ async def api_ticket_create(
|
|||
|
||||
name = data.name
|
||||
email = data.email
|
||||
user_id = data.user_id
|
||||
promo_code = data.promo_code.upper() if data.promo_code else None
|
||||
refund_address = data.refund_address
|
||||
nostr_identifier = data.nostr_identifier.strip() if data.nostr_identifier else None
|
||||
|
|
@ -605,6 +606,7 @@ async def api_ticket_create(
|
|||
event=event.id,
|
||||
name=name,
|
||||
email=email,
|
||||
user_id=user_id,
|
||||
extra={
|
||||
"applied_promo_code": promo_code,
|
||||
"refund_address": refund_address,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue