File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,6 @@ def weakness(self):
285285 return weakness
286286 except Exception as e :
287287 logger .warning (f"Could not find CWE { self .cwe_id } : { e } " )
288- return None
289288
290289 @property
291290 def name (self ):
Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ def get_queryset(self):
117117 def get_context_data (self , ** kwargs ):
118118 context = super ().get_context_data (** kwargs )
119119 weaknesses = self .object .weaknesses .all ()
120- weaknesses_present_in_db = [weakness for weakness in weaknesses if weakness .weakness ]
120+ weaknesses_present_in_db = [
121+ weakness_object for weakness_object in weaknesses if weakness_object .weakness
122+ ]
121123 context .update (
122124 {
123125 "vulnerability" : self .object ,
You can’t perform that action at this time.
0 commit comments