Initialise UpdatedAt for stash ids (#5680)

* Initialise imported zero time to epoch time

Fixes null time error after importing stash id without updatedAt set

* Update unit tests
This commit is contained in:
WithoutPants
2025-02-26 08:03:35 +11:00
committed by GitHub
parent 1e05766571
commit b8af147a8d
5 changed files with 82 additions and 46 deletions

View File

@@ -24,6 +24,8 @@ import (
_ "github.com/stashapp/stash/pkg/sqlite/migrations"
)
var epochTime = time.Unix(0, 0).UTC()
const (
spacedSceneTitle = "zzz yyy xxx"
)
@@ -1028,8 +1030,9 @@ func getObjectDate(index int) *models.Date {
func sceneStashID(i int) models.StashID {
return models.StashID{
StashID: getSceneStringValue(i, "stashid"),
Endpoint: getSceneStringValue(i, "endpoint"),
StashID: getSceneStringValue(i, "stashid"),
Endpoint: getSceneStringValue(i, "endpoint"),
UpdatedAt: epochTime,
}
}