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
2 changed files with 9 additions and 1 deletions
+4
View File
@@ -518,6 +518,10 @@ export function createModel (builder: Builder): void {
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, {
component: view.component.ObjectFilter
})
+5 -1
View File
@@ -99,7 +99,11 @@ class InMemoryAdapter implements DbAdapter {
async init (model: Tx[]): Promise<void> {
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)
}
}
}