mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Map parent studio after creation (#5996)
This commit is contained in:
@@ -680,15 +680,28 @@ export const TaggerContext: React.FC = ({ children }) => {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let resultStudio = r.studio;
|
||||||
|
if (resultStudio.name === studio.name) {
|
||||||
|
resultStudio = {
|
||||||
|
...resultStudio,
|
||||||
|
stored_id: studioID,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// #5821 - set the stored_id of the parent studio if it matches too
|
||||||
|
if (resultStudio.parent?.name === studio.name) {
|
||||||
|
resultStudio = {
|
||||||
|
...resultStudio,
|
||||||
|
parent: {
|
||||||
|
...resultStudio.parent,
|
||||||
|
stored_id: studioID,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...r,
|
...r,
|
||||||
studio:
|
studio: resultStudio,
|
||||||
r.studio.name === studio.name
|
|
||||||
? {
|
|
||||||
...r.studio,
|
|
||||||
stored_id: studioID,
|
|
||||||
}
|
|
||||||
: r.studio,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user