api/graph: Fix panic in SubmitTicket for external participants

Previously, calling the submitTicket mutation with an externalId would
panic due to the participant variable not being properly initialized.
This commit is contained in:
Adnan Maolood 2022-03-28 13:14:58 -04:00 committed by Drew DeVault
parent d8837e4494
commit baad258c05
1 changed files with 1 additions and 1 deletions

View File

@ -710,7 +710,7 @@ func (r *mutationResolver) SubmitTicket(ctx context.Context, trackerID int, inpu
DO UPDATE SET created = participant.created
RETURNING id
`, *input.ExternalID, *input.ExternalURL)
participant := &model.Participant{}
participant = &model.Participant{}
if err := row.Scan(&participant.ID); err != nil {
return err
}