Fix duplicate activity

Fix duplicate activity

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2021-11-19 14:41:20 +07:00
parent 537e32b138
commit f2a7b73edf
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

View File

@ -53,7 +53,11 @@ abstract class MongoAdapterBase extends TxProcessor {
translated[key] = value
}
const classes = this.hierarchy.getDescendants(clazz)
translated._class = { $in: classes }
// Only replace if not specified
if (translated._class?.$in === undefined) {
translated._class = { $in: classes }
}
// return Object.assign({}, query, { _class: { $in: classes } })
return translated
}