mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Handle NULL in regex criteria (#1208)
This commit is contained in:
@@ -587,6 +587,15 @@ func getPerformerBirthdate(index int) string {
|
||||
return birthdate.Format("2006-01-02")
|
||||
}
|
||||
|
||||
func getPerformerCareerLength(index int) *string {
|
||||
if index%5 == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
ret := fmt.Sprintf("20%2d", index)
|
||||
return &ret
|
||||
}
|
||||
|
||||
//createPerformers creates n performers with plain Name and o performers with camel cased NaMe included
|
||||
func createPerformers(pqb models.PerformerReaderWriter, n int, o int) error {
|
||||
const namePlain = "Name"
|
||||
@@ -613,6 +622,11 @@ func createPerformers(pqb models.PerformerReaderWriter, n int, o int) error {
|
||||
},
|
||||
}
|
||||
|
||||
careerLength := getPerformerCareerLength(i)
|
||||
if careerLength != nil {
|
||||
performer.CareerLength = models.NullString(*careerLength)
|
||||
}
|
||||
|
||||
created, err := pqb.Create(performer)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user