mirror of
https://github.com/stashapp/stash.git
synced 2026-02-11 09:55:16 +01:00
Map parent studio after creation (#5996)
This commit is contained in:
parent
642b0f2291
commit
694675470e
1 changed files with 20 additions and 7 deletions
|
|
@ -680,15 +680,28 @@ export const TaggerContext: React.FC = ({ children }) => {
|
|||
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 {
|
||||
...r,
|
||||
studio:
|
||||
r.studio.name === studio.name
|
||||
? {
|
||||
...r.studio,
|
||||
stored_id: studioID,
|
||||
}
|
||||
: r.studio,
|
||||
studio: resultStudio,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue