summaryrefslogtreecommitdiff
path: root/pgweb/security/struct.py
diff options
context:
space:
mode:
authorMagnus Hagander2021-04-09 13:20:56 +0000
committerMagnus Hagander2021-04-09 13:20:56 +0000
commit368550f2ee06db9e40099da36e133b2e291cf6f8 (patch)
treea8a18736a906934dd0bd2a285c5fb07e10453d21 /pgweb/security/struct.py
parent44415d86a9f786a3fc75f3968235c197a40f784e (diff)
Exclude security notices with no CVE from list of CVEs in sitemap
Otherwise we're instructing google and others to index pages that don't exist.
Diffstat (limited to 'pgweb/security/struct.py')
-rw-r--r--pgweb/security/struct.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgweb/security/struct.py b/pgweb/security/struct.py
index fd5a713b..c3f325df 100644
--- a/pgweb/security/struct.py
+++ b/pgweb/security/struct.py
@@ -5,5 +5,5 @@ from .models import SecurityPatch
def get_struct():
"""create sitemap entries for each CVE entry and the top level CVE URL"""
yield ('support/security/', None)
- for s in SecurityPatch.objects.filter(public=True).order_by('-cvenumber'):
+ for s in SecurityPatch.objects.filter(public=True).exclude(cve='').order_by('-cvenumber'):
yield ('support/security/CVE-{}'.format(s.cve), None)