Allow enum value to be used in filters (#2085)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-06-16 01:03:09 +07:00 committed by GitHub
parent 4b5cecdda9
commit f4ff886ce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -518,6 +518,10 @@ export function createModel (builder: Builder): void {
component: view.component.ValueFilter component: view.component.ValueFilter
}) })
builder.mixin(core.class.EnumOf, core.class.Class, view.mixin.AttributeFilter, {
component: view.component.ValueFilter
})
builder.mixin(core.class.RefTo, core.class.Class, view.mixin.AttributeFilter, { builder.mixin(core.class.RefTo, core.class.Class, view.mixin.AttributeFilter, {
component: view.component.ObjectFilter component: view.component.ObjectFilter
}) })

View File

@ -99,7 +99,11 @@ class InMemoryAdapter implements DbAdapter {
async init (model: Tx[]): Promise<void> { async init (model: Tx[]): Promise<void> {
for (const tx of model) { for (const tx of model) {
await this.modeldb.tx(tx) try {
await this.modeldb.tx(tx)
} catch (err: any) {
console.error('skip broken TX', err)
}
} }
} }