Ignore non-existing scenes in fingerprint submits (#3039)

This commit is contained in:
WithoutPants
2022-10-24 10:26:21 +11:00
committed by GitHub
parent 4db0e48f73
commit 091950615e

View File

@@ -3,7 +3,9 @@ package stashbox
import (
"bytes"
"context"
"database/sql"
"encoding/json"
"errors"
"fmt"
"io"
"mime/multipart"
@@ -227,8 +229,9 @@ func (c Client) SubmitStashBoxFingerprints(ctx context.Context, sceneIDs []strin
qb := c.repository.Scene
for _, sceneID := range ids {
// TODO - Find should return an appropriate not found error
scene, err := qb.Find(ctx, sceneID)
if err != nil {
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return err
}