(self)
| 3446 | ) |
| 3447 | |
| 3448 | def to_dict(self): |
| 3449 | from vulnerabilities.utils import purl_to_dict |
| 3450 | |
| 3451 | return { |
| 3452 | "package": purl_to_dict(self.base_purl), |
| 3453 | "affected_version_range": self.affecting_vers, |
| 3454 | "fixed_version_range": self.fixed_vers, |
| 3455 | "introduced_by_commit_patches": [ |
| 3456 | commit.to_dict() for commit in self.introduced_by_package_commit_patches.all() |
| 3457 | ], |
| 3458 | "fixed_by_commit_patches": [ |
| 3459 | commit.to_dict() for commit in self.fixed_by_package_commit_patches.all() |
| 3460 | ], |
| 3461 | } |
| 3462 | |
| 3463 | def to_affected_package_data(self): |
| 3464 | """Return `AffectedPackageV2` data from the impact.""" |
no test coverage detected