fix(report):check first_time
This commit is contained in:
@@ -287,7 +287,7 @@ class ReportRepository():
|
||||
list_project = await use_collection(TaskEnv.CLN_PROJECT).find({"_id":{"$in":get_list_project_id}}).to_list(None)
|
||||
if list_project:
|
||||
for i in list_project:
|
||||
if i['monitor']['detail']['first_time'] and i['monitor']['sts'] == 5:
|
||||
if 'first_time' in i['monitor']['detail'] and i['monitor']['sts'] == 5:
|
||||
cal = (get_dict_project_id[str(i["_id"])]['sum']/i['monitor']['detail']['first_time'])*100
|
||||
if cal < 20 :
|
||||
result['less_than_20'].append(i["_id"])
|
||||
|
||||
Reference in New Issue
Block a user