From 0308c4a516a217487e689fa9fd7803dfc9e1a104 Mon Sep 17 00:00:00 2001 From: toshski Date: Wed, 7 Feb 2024 06:48:36 +1300 Subject: [PATCH] Check for Deleted Actors when updating from Stashdb --- pkg/externalreference/stashdb.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/externalreference/stashdb.go b/pkg/externalreference/stashdb.go index 31d8572a9..149fa1c02 100644 --- a/pkg/externalreference/stashdb.go +++ b/pkg/externalreference/stashdb.go @@ -279,7 +279,10 @@ func UpdateXbvrActor(performer models.StashPerformer, xbvrActorID uint) { changed := false actor := models.Actor{ID: xbvrActorID} - db.Where(&actor).First(&actor) + err := db.Where(&actor).First(&actor).Error + if err != nil { + return + } if len(performer.Images) > 0 { if actor.ImageUrl != performer.Images[0].URL && !actor.CheckForSetImage() {