From 8202f2782ce987ed36159bfc1640944c1b7fa41c Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Tue, 12 Sep 2023 10:10:21 -0600 Subject: [PATCH] regression: Reports by-department showing null when department no longer exists (#30350) --- 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 }, },