e = g
if self.subscorelookup:
e["exploitCVSS"]=(math.ceil(exploitabilityScore(e)*10)/10)
e["impactCVSS"]=(math.ceil(impactScore(e)*10)/10)
e.pop("_id")
else:
e = None
After Change
if self.subscorelookup:
exploitCVSS=exploitabilityScore(e)
impactCVSS =impactScore(e)
e["exploitCVSS"]=(math.ceil(exploitCVSS*10)/10) if type(exploitCVSS) is not str else exploitCVSS
e["impactCVSS"]=(math.ceil(impactCVSS*10)/10) if type(impactCVSS) is not str else impactCVSS
e.pop("_id")
else: