Skip to content

Commit

Permalink
TSK-1393: Fix status findAll requests extra data (#3105)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo authored Apr 28, 2023
1 parent 8131ee9 commit 59d1e2e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/presentation/src/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 59d1e2e

Please sign in to comment.