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

@@ -117,10 +117,7 @@ func (r *queryResolver) SceneMarkerTags(ctx context.Context, scene_id string) ([
var keys []int
tqb := models.NewTagQueryBuilder()
for _, sceneMarker := range sceneMarkers {
if !sceneMarker.PrimaryTagID.Valid {
panic("missing primary tag id")
}
markerPrimaryTag, err := tqb.Find(int(sceneMarker.PrimaryTagID.Int64), nil)
markerPrimaryTag, err := tqb.Find(sceneMarker.PrimaryTagID, nil)
if err != nil {
return nil, err
}