mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Fix create missing checkbox not persisting (#4008)
This commit is contained in:
@@ -190,19 +190,24 @@ const FieldOptionsEditor: React.FC<IFieldOptionsEditor> = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const localOptionsCopy = { ...localOptions };
|
||||||
|
if (localOptionsCopy.strategy === undefined && !allowSetDefault) {
|
||||||
|
localOptionsCopy.strategy = GQL.IdentifyFieldStrategy.Merge;
|
||||||
|
}
|
||||||
|
|
||||||
// send null if strategy is undefined
|
// send null if strategy is undefined
|
||||||
if (localOptions.strategy === undefined) {
|
if (localOptionsCopy.strategy === undefined) {
|
||||||
editOptions(null);
|
editOptions(null);
|
||||||
resetOptions();
|
resetOptions();
|
||||||
} else {
|
} else {
|
||||||
let { createMissing } = localOptions;
|
let { createMissing } = localOptionsCopy;
|
||||||
if (createMissing === undefined && !allowSetDefault) {
|
if (createMissing === undefined && !allowSetDefault) {
|
||||||
createMissing = false;
|
createMissing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
editOptions({
|
editOptions({
|
||||||
...localOptions,
|
...localOptionsCopy,
|
||||||
strategy: localOptions.strategy,
|
strategy: localOptionsCopy.strategy,
|
||||||
createMissing,
|
createMissing,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user