mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
added details, deathdate, hair color, weight to performers and added details to studios (#1274)
* added details to performers and studios * added deathdate, hair_color and weight to performers * Simplify performer/studio create mutations * Add changelog and recategorised Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -214,10 +214,16 @@ func verifyPerformerAge(t *testing.T, ageCriterion models.IntCriterionInput) {
|
||||
|
||||
now := time.Now()
|
||||
for _, performer := range performers {
|
||||
cd := now
|
||||
|
||||
if performer.DeathDate.Valid {
|
||||
cd, _ = time.Parse("2006-01-02", performer.DeathDate.String)
|
||||
}
|
||||
|
||||
bd := performer.Birthdate.String
|
||||
d, _ := time.Parse("2006-01-02", bd)
|
||||
age := now.Year() - d.Year()
|
||||
if now.YearDay() < d.YearDay() {
|
||||
age := cd.Year() - d.Year()
|
||||
if cd.YearDay() < d.YearDay() {
|
||||
age = age - 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user