Scenes with a marker missing a primary tag fails to load

Fixes #42
This commit is contained in:
Stash Dev
2019-04-20 10:32:01 -07:00
parent 7742024dfb
commit d6eb2c2d8e
10 changed files with 30 additions and 35 deletions

View File

@@ -109,11 +109,7 @@ func (t *ExportTask) ExportScenes(ctx context.Context) {
newSceneJSON.Tags = t.getTagNames(tags)
for _, sceneMarker := range sceneMarkers {
var primaryTagID int
if sceneMarker.PrimaryTagID.Valid {
primaryTagID = int(sceneMarker.PrimaryTagID.Int64)
}
primaryTag, err := tagQB.Find(primaryTagID, tx)
primaryTag, err := tagQB.Find(sceneMarker.PrimaryTagID, tx)
if err != nil {
logger.Errorf("[scenes] <%s> invalid primary tag for scene marker: %s", scene.Checksum, err.Error())
continue