Don't overwrite with empty values in tagger (#2461)

This commit is contained in:
WithoutPants 2022-04-02 17:47:27 +11:00 committed by GitHub
parent b504a89247
commit e5c4241180
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -9,6 +9,7 @@
* Improved autotag performance. ([#2368](https://github.com/stashapp/stash/pull/2368))
### 🐛 Bug fixes
* Fix scene fields being overwritten with empty values when saving from the scene tagger. ([#2461](https://github.com/stashapp/stash/pull/2461))
* Fix Is Missing Date filter not including null date values. ([#2434](https://github.com/stashapp/stash/pull/2434))
* Fix Open Stash systray menu item not opening stash when Skip Opening Browser was enabled. ([#2418](https://github.com/stashapp/stash/pull/2418))
* Fix error saving a scene from the tagger when the scene has stash ids. ([#2408](https://github.com/stashapp/stash/pull/2408))

View file

@ -275,7 +275,10 @@ const StashSearchResult: React.FC<IStashSearchResultProps> = ({
);
function resolveField<T>(field: string, stashField: T, remoteField: T) {
if (excludedFieldList.includes(field)) {
// #2452 - don't overwrite fields that are already set if the remote field is empty
const remoteFieldIsNull =
remoteField === null || remoteField === undefined;
if (excludedFieldList.includes(field) || remoteFieldIsNull) {
return stashField;
}