diff --git a/app/http/endpoints/api/export/import.go b/app/http/endpoints/api/export/import.go index 626a611..0d07651 100644 --- a/app/http/endpoints/api/export/import.go +++ b/app/http/endpoints/api/export/import.go @@ -595,8 +595,12 @@ func ImportHandler(ctx *gin.Context) { // Import tickets for _, ticket := range data.Tickets { if _, ok := ticketIdMap[ticket.Id]; !ok { - newPanelId := panelIdMap[*ticket.PanelId] - newTicketId, err := dbclient.Client.Tickets.Create(ctx, guildId, ticket.UserId, ticket.IsThread, &newPanelId) + var panelId *int + if ticket.PanelId != nil { + a := panelIdMap[*ticket.PanelId] + panelId = &a + } + newTicketId, err := dbclient.Client.Tickets.Create(ctx, guildId, ticket.UserId, ticket.IsThread, panelId) if err != nil { ctx.JSON(500, utils.ErrorJson(err)) return