Fix batch performer panic (#3456)

This commit is contained in:
DingDongSoLong4
2023-02-20 00:12:22 +02:00
committed by WithoutPants
parent 96ce260a40
commit ccbe3c4e92

View File

@@ -191,8 +191,14 @@ func (t *StashBoxPerformerTagTask) stashBoxPerformerTag(ctx context.Context) {
} }
} else if t.name != nil && performer.Name != nil { } else if t.name != nil && performer.Name != nil {
currentTime := time.Now() currentTime := time.Now()
var aliases []string
if performer.Aliases != nil {
aliases = stringslice.FromString(*performer.Aliases, ",")
} else {
aliases = []string{}
}
newPerformer := models.Performer{ newPerformer := models.Performer{
Aliases: models.NewRelatedStrings(stringslice.FromString(*performer.Aliases, ",")), Aliases: models.NewRelatedStrings(aliases),
Birthdate: getDate(performer.Birthdate), Birthdate: getDate(performer.Birthdate),
CareerLength: getString(performer.CareerLength), CareerLength: getString(performer.CareerLength),
Country: getString(performer.Country), Country: getString(performer.Country),