UBER-393 Showing project from different workspace (#3374)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-06-07 12:44:07 +06:00 committed by GitHub
parent bdbf2c650d
commit 057feb89d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,10 +74,11 @@
} }
objectsPromise = client.findAll( objectsPromise = client.findAll(
_class, _class,
{ ...resultQuery, ...(space ? { space } : {}) }, { ...resultQuery, ...(space ? { space } : { '$lookup.space.archived': false }) },
{ {
sort: { [filter.key.key]: SortingOrder.Ascending }, sort: { [filter.key.key]: SortingOrder.Ascending },
projection: { [prefix + filter.key.key]: 1, space: 1 } projection: { [prefix + filter.key.key]: 1, space: 1 },
...(space ? {} : { lookup: { space: core.class.Space } })
} }
) )
const res = await objectsPromise const res = await objectsPromise