From 439f7b3c155c4686732b526f30f9da692770bff6 Mon Sep 17 00:00:00 2001 From: shahzeydyfah Date: Mon, 10 Aug 2026 23:32:52 +0330 Subject: [PATCH] fix(report):check design projects --- app/repositories/report.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/repositories/report.py b/app/repositories/report.py index 96bd598..dc83684 100644 --- a/app/repositories/report.py +++ b/app/repositories/report.py @@ -17,6 +17,16 @@ class ReportRepository(): match.update({'design.type_id': _inp.type_id}) if _inp.nature_id: match.update({'design.nature_id': _inp.nature_id}) + if type == 'design': + match.update({ + '$or': [ + {'has_monitor': False}, + { + 'monitor.has_design': True, + 'has_monitor': True + } + ] + }) if type == 'monitor' and _inp.monitor_type: match.update({'monitor.base_information.type': _inp.monitor_type}) report = await use_collection(TaskEnv.CLN_PROJECT).aggregate([