mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-13 00:22:49 +00:00
fix panic on loading tracking pixel for deleted campaign
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -1071,6 +1071,10 @@ func (c *Campaign) SaveTrackingPixelLoaded(
|
||||
campaignRecipientID,
|
||||
)
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
c.Logger.Debugw("campaign recipient not found for tracking pixel", "campaign_recipient_id", campaignRecipientID.String())
|
||||
return err
|
||||
}
|
||||
c.Logger.Errorw("failed to get campaign recipient by id", "error", err)
|
||||
return errs.Wrap(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user