TSK-1393: Fix status findAll requests extra data (#3105)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-04-28 14:33:12 +07:00 committed by GitHub
parent 8131ee912f
commit 59d1e2eb37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,13 +257,12 @@ export class StatusMiddleware extends BasePresentationMiddleware implements Pres
;(query as any)[attr.name].$nin = targetNin
}
}
if (finalOptions.lookup !== undefined) {
// Remove lookups by status field
if ((finalOptions.lookup as any)[attr.name] !== undefined) {
const { [attr.name]: _, ...newLookup } = finalOptions.lookup as any
finalOptions.lookup = newLookup
}
}
if (finalOptions.lookup !== undefined) {
// Remove lookups by status field
if ((finalOptions.lookup as any)[attr.name] !== undefined) {
const { [attr.name]: _, ...newLookup } = finalOptions.lookup as any
finalOptions.lookup = newLookup
}
}