File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,6 @@ def simple_metrics(request):
185
185
total_medium = []
186
186
total_low = []
187
187
total_info = []
188
- total_closed = []
189
188
total_opened = []
190
189
findings_broken_out = {}
191
190
@@ -197,10 +196,20 @@ def simple_metrics(request):
197
196
date__year = now .year ,
198
197
)
199
198
199
+ closed = Finding .objects .filter (test__engagement__product__prod_type = pt ,
200
+ false_p = False ,
201
+ duplicate = False ,
202
+ out_of_scope = False ,
203
+ mitigated__month = now .month ,
204
+ mitigated__year = now .year ,
205
+ )
206
+
200
207
if get_system_setting ("enforce_verified_status" , True ) or get_system_setting ("enforce_verified_status_metrics" , True ):
201
208
total = total .filter (verified = True )
209
+ closed = closed .filter (verified = True )
202
210
203
211
total = total .distinct ()
212
+ closed = closed .distinct ()
204
213
205
214
for f in total :
206
215
if f .severity == "Critical" :
@@ -214,9 +223,6 @@ def simple_metrics(request):
214
223
else :
215
224
total_info .append (f )
216
225
217
- if f .mitigated and f .mitigated .year == now .year and f .mitigated .month == now .month :
218
- total_closed .append (f )
219
-
220
226
if f .date .year == now .year and f .date .month == now .month :
221
227
total_opened .append (f )
222
228
@@ -228,7 +234,7 @@ def simple_metrics(request):
228
234
findings_broken_out ["S4" ] = len (total_info )
229
235
230
236
findings_broken_out ["Opened" ] = len (total_opened )
231
- findings_broken_out ["Closed" ] = len (total_closed )
237
+ findings_broken_out ["Closed" ] = len (closed )
232
238
233
239
findings_by_product_type [pt ] = findings_broken_out
234
240
You can’t perform that action at this time.
0 commit comments