From 2f97539f5054c88e34ebf7a49b20af679df729e6 Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Mon, 11 Sep 2023 11:53:50 -0600 Subject: [PATCH] Reports by-department showing null when department no longer exists --- apps/meteor/ee/server/models/raw/LivechatRooms.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/meteor/ee/server/models/raw/LivechatRooms.ts b/apps/meteor/ee/server/models/raw/LivechatRooms.ts index 227da1c98e8c..70824c7d7130 100644 --- a/apps/meteor/ee/server/models/raw/LivechatRooms.ts +++ b/apps/meteor/ee/server/models/raw/LivechatRooms.ts @@ -540,6 +540,13 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo }, }, }, + { + $match: { + _id: { + $ne: null, + }, + }, + }, { $sort: sort || { total: 1 }, },