api/webhooks: Fix legacy ticket event:create webhooks

Look up ticket webhook subscriptions by the ticket ID instead of the
ticket scoped_id.
This commit is contained in:
Adnan Maolood 2022-04-27 11:41:32 -04:00 committed by Drew DeVault
parent 4c2e2792fa
commit 467dd4075f
1 changed files with 1 additions and 1 deletions

View File

@ -462,6 +462,6 @@ func DeliverLegacyEventCreate(ctx context.Context,
query = sq.
Select().
From("ticket_webhook_subscription sub").
Where("sub.ticket_id = ?", ticket.ID)
Where("sub.ticket_id = ?", ticket.PKID)
q.Schedule(ctx, query, "ticket", "event:create", encoded)
}