mirror of
https://github.com/stashapp/stash.git
synced 2025-12-25 01:34:41 +01:00
Fix create missing checkbox not persisting (#4008)
This commit is contained in:
parent
030bc5d7c1
commit
ed9f35a973
1 changed files with 9 additions and 4 deletions
|
|
@ -190,19 +190,24 @@ const FieldOptionsEditor: React.FC<IFieldOptionsEditor> = ({
|
|||
return;
|
||||
}
|
||||
|
||||
const localOptionsCopy = { ...localOptions };
|
||||
if (localOptionsCopy.strategy === undefined && !allowSetDefault) {
|
||||
localOptionsCopy.strategy = GQL.IdentifyFieldStrategy.Merge;
|
||||
}
|
||||
|
||||
// send null if strategy is undefined
|
||||
if (localOptions.strategy === undefined) {
|
||||
if (localOptionsCopy.strategy === undefined) {
|
||||
editOptions(null);
|
||||
resetOptions();
|
||||
} else {
|
||||
let { createMissing } = localOptions;
|
||||
let { createMissing } = localOptionsCopy;
|
||||
if (createMissing === undefined && !allowSetDefault) {
|
||||
createMissing = false;
|
||||
}
|
||||
|
||||
editOptions({
|
||||
...localOptions,
|
||||
strategy: localOptions.strategy,
|
||||
...localOptionsCopy,
|
||||
strategy: localOptionsCopy.strategy,
|
||||
createMissing,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue