Fix zero status filter values (#2970)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-04-13 10:37:11 +06:00 committed by GitHub
parent 93dd4489d7
commit dd6619985c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,9 @@
const options = clazz.sortingKey !== undefined ? { sort: { [clazz.sortingKey]: SortingOrder.Ascending } } : {}
objectsPromise = client.findAll(targetClass, resultQuery, options)
values = await objectsPromise
if (isStatus) {
values = groupValues(values as Status[])
}
if (targets.has(undefined)) {
values.unshift(undefined)
}
@ -116,9 +119,6 @@
})
}
}
if (isStatus) {
values = groupValues(values as Status[])
}
objectsPromise = undefined
}