Fix panic in /preview/channel/{id}
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package jobs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"blackforestbytes.com/simplecloudnotifier/db/simplectx"
|
||||
"blackforestbytes.com/simplecloudnotifier/logic"
|
||||
"blackforestbytes.com/simplecloudnotifier/models"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/syncext"
|
||||
"github.com/rs/zerolog/log"
|
||||
"time"
|
||||
)
|
||||
|
||||
type DeliveryRetryJob struct {
|
||||
@@ -208,7 +209,7 @@ func (j *DeliveryRetryJob) redeliver(ctx *simplectx.SimpleContext, delivery mode
|
||||
return
|
||||
}
|
||||
|
||||
channel, err := j.app.Database.Primary.GetChannelByID(ctx, msg.ChannelID)
|
||||
channel, err := j.app.Database.Primary.GetChannelByIDOpt(ctx, msg.ChannelID)
|
||||
if err != nil {
|
||||
log.Err(err).Str("ChannelID", msg.ChannelID.String()).Msg("Failed to get channel")
|
||||
ctx.RollbackTransaction()
|
||||
|
||||
Reference in New Issue
Block a user