diff --git a/app/repositories/project.py b/app/repositories/project.py index c1d4970..72c7181 100644 --- a/app/repositories/project.py +++ b/app/repositories/project.py @@ -82,15 +82,7 @@ class ProjectRepository(BaseRepository[ProjectModel]): update.monitor.code = 'S' + code if update.monitor: update.has_monitor = True - if update.monitor.detail and update.monitor.detail.first_amount: - price = await use_collection(TaskEnv.CLN_PROJECT_PRICE_REPORT).find_one({'project_id':_id}) - if not price: - price = { - '_id': uuid.uuid4(), - 'project_id': _id, - 'first_amount': update.monitor.detail.first_amount - } - await use_collection(TaskEnv.CLN_PROJECT_PRICE_REPORT).insert_one(price) + await self.update_report_price(update) update.u_at() await use_collection(COLLECTION).update_one({"_id":_id},{"$set":update.mongo_dict()})