From f2a7b73edf6c7abcaf7eeb13653d34b1b6ff6ef7 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Fri, 19 Nov 2021 14:41:20 +0700 Subject: [PATCH] Fix duplicate activity Fix duplicate activity Signed-off-by: Andrey Sobolev --- server/mongo/src/storage.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/mongo/src/storage.ts b/server/mongo/src/storage.ts index 7ecc1435c4..2706fb2d13 100644 --- a/server/mongo/src/storage.ts +++ b/server/mongo/src/storage.ts @@ -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 }