From a01be5c9ef388881cb0324c452249f9dc955f07a Mon Sep 17 00:00:00 2001 From: shahzeydyfah Date: Sat, 30 Nov 2024 06:56:09 +0330 Subject: [PATCH] feat(monitor physical):add update --- app/repositories/monitor_physical_progress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/repositories/monitor_physical_progress.py b/app/repositories/monitor_physical_progress.py index 6fab3f6..f275261 100644 --- a/app/repositories/monitor_physical_progress.py +++ b/app/repositories/monitor_physical_progress.py @@ -41,7 +41,7 @@ class PhysicalProgressRepository(BaseRepository): if three_month: send['three_month'] = three_month _avg = await use_collection(TaskEnv.CLN_MONITOR_PYSICAL).aggregate([ - {'$match':{'project_id':_inp.project_id}}, + {'$match':{'project_id':_inp.project_id, "date_at": {"$lt": _inp.date_at}}}, {'$group': {'_id': None, 'avg': {'$avg': "$real"}, 'sum':{'$sum': "$real"}, 'count':{'$sum': 1}}} ]).to_list(None) if _avg: