Skip to content

Commit

Permalink
Require descriptions for domains in authorized sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Oct 11, 2017
1 parent fc2f585 commit 0bf3592
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hasjob/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,11 @@ def sitemap(key):
' </url>\n'
if authorized_sitemap:
# Add domains to sitemap
for domain in Domain.query.filter(Domain.title != None).order_by('updated_at desc').all(): # NOQA
for domain in Domain.query.filter(
Domain.title != None,
Domain.description != None,
Domain.description != ''
).order_by('updated_at desc').all(): # NOQA
sitemapxml += ' <url>\n'\
' <loc>%s</loc>\n' % domain.url_for(_external=True) + \
' <lastmod>%s</lastmod>\n' % (domain.updated_at.isoformat() + 'Z') + \
Expand Down

0 comments on commit 0bf3592

Please sign in to comment.