mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Fix reports on unsubmitted fingerprints
This commit is contained in:
parent
81f890be58
commit
afd2a5d5b8
1 changed files with 7 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
|
|
@ -485,6 +486,12 @@ func (c Client) SubmitFingerprintsWithVote(ctx context.Context, scene *models.Sc
|
|||
for _, fingerprint := range fingerprints {
|
||||
_, err := c.client.SubmitFingerprint(ctx, fingerprint)
|
||||
if err != nil {
|
||||
// When voting INVALID, stash-box returns "fingerprint has no submissions" if the
|
||||
// fingerprint hasn't been associated with that scene yet. There's nothing to
|
||||
// invalidate in that case, so skip it rather than failing the whole submission.
|
||||
if vote == models.FingerprintVoteInvalid && strings.Contains(err.Error(), "fingerprint has no submissions") {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue