mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
UBERF-4216: fix query for cases with mixins (#3981)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
49e8bacce7
commit
64ae21db07
@ -60,18 +60,18 @@
|
||||
}
|
||||
values.clear()
|
||||
realValues.clear()
|
||||
const resultQuery =
|
||||
isSearchable && search !== ''
|
||||
? {
|
||||
[filter.key.key]: { $like: '%' + search + '%' }
|
||||
}
|
||||
: {}
|
||||
let prefix = ''
|
||||
const hierarchy = client.getHierarchy()
|
||||
const attr = hierarchy.getAttribute(filter.key._class, filter.key.key)
|
||||
if (hierarchy.isMixin(attr.attributeOf)) {
|
||||
prefix = attr.attributeOf + '.'
|
||||
}
|
||||
const resultQuery =
|
||||
isSearchable && search !== ''
|
||||
? {
|
||||
[prefix + filter.key.key]: { $like: '%' + search + '%' }
|
||||
}
|
||||
: {}
|
||||
const isDerivedFromSpace = hierarchy.isDerived(_class, core.class.Space)
|
||||
|
||||
const spaces =
|
||||
|
Loading…
Reference in New Issue
Block a user