mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Handle linking tags in non-stash-box environment (#6402)
This commit is contained in:
@@ -871,8 +871,7 @@ export const TaggerContext: React.FC = ({ children }) => {
|
|||||||
tag: GQL.ScrapedTag,
|
tag: GQL.ScrapedTag,
|
||||||
updateInput: GQL.TagUpdateInput
|
updateInput: GQL.TagUpdateInput
|
||||||
) {
|
) {
|
||||||
if (!tag.remote_site_id || !currentSource?.sourceInput.stash_box_endpoint)
|
const hasRemoteID = !!tag.remote_site_id;
|
||||||
return;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await updateTag({
|
await updateTag({
|
||||||
@@ -889,7 +888,10 @@ export const TaggerContext: React.FC = ({ children }) => {
|
|||||||
return {
|
return {
|
||||||
...r,
|
...r,
|
||||||
tags: r.tags.map((t) => {
|
tags: r.tags.map((t) => {
|
||||||
if (t.remote_site_id === tag.remote_site_id) {
|
if (
|
||||||
|
(hasRemoteID && t.remote_site_id === tag.remote_site_id) ||
|
||||||
|
(!hasRemoteID && t.name === tag.name)
|
||||||
|
) {
|
||||||
return {
|
return {
|
||||||
...t,
|
...t,
|
||||||
stored_id: updateInput.id,
|
stored_id: updateInput.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user