Skip to content

Commit

Permalink
Backend: Handle none empty url case in vulnerabilityReference
Browse files Browse the repository at this point in the history
  • Loading branch information
savish28 committed Mar 31, 2021
1 parent 80c78df commit 9e8fb3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vulnerabilities/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def scores(self):
return VulnerabilitySeverity.objects.filter(reference=self.id)

def save(self, *args, **kwargs):
if self.id:
if self.id or not self.url:
super(VulnerabilityReference, self).save(*args, **kwargs)
else:
url_parsed = urlpy.parse(self.url)
Expand Down

0 comments on commit 9e8fb3c

Please sign in to comment.