Skip to content

Commit 401539b

Browse files
committed
Rename Package.affecting_vulnerabilities
Use the more accurate affected_by_vulnerabilities Create an alias to ensure compatbility Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 9cfb624 commit 401539b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

vulnerabilities/models.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,17 +817,19 @@ def get_affecting_vulnerabilities(self):
817817
@property
818818
def fixing_vulnerabilities(self):
819819
"""
820-
Return a queryset of Vulnerabilities that are fixed by this `package`.
820+
Return a queryset of Vulnerabilities that are fixed by this package.
821821
"""
822822
return self.vulnerabilities.filter(packagerelatedvulnerability__fix=True)
823823

824824
@property
825-
def affecting_vulnerabilities(self):
825+
def affected_by_vulnerabilities(self):
826826
"""
827-
Return a queryset of Vulnerabilities that affect this `package`.
827+
Return a queryset of Vulnerabilities that affect this package.
828828
"""
829829
return self.vulnerabilities.filter(packagerelatedvulnerability__fix=False)
830830

831+
affecting_vulnerabilities = affected_by_vulnerabilities
832+
831833

832834
class PackageRelatedVulnerability(models.Model):
833835
"""

0 commit comments

Comments
 (0)