diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-16 02:38:51 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-16 02:38:51 -0400 |
commit | c8d979b8a48805d162ab46cdc4e493da0aa1595c (patch) | |
tree | 6846db4f47e29a3fb6a951383ec764a897d3ab85 /sitemaps.py | |
parent | 4d4f76a4fd24891669c254b86b0173258b719b0e (diff) | |
parent | 790def2f4db2afec150bab8dc842f6068fb751db (diff) |
Merge tag 'release_2015-04-13' into archweb-generic
Fix up 'None' display in places
Diffstat (limited to 'sitemaps.py')
-rw-r--r-- | sitemaps.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sitemaps.py b/sitemaps.py index 03ad9254..7746ecab 100644 --- a/sitemaps.py +++ b/sitemaps.py @@ -37,12 +37,17 @@ class PackagesSitemap(Sitemap): class PackageFilesSitemap(PackagesSitemap): changefreq = "weekly" priority = "0.1" + # we fixed a bug on the package files page on this day, force modification + lastmod_min = datetime(2015, 4, 12).replace(tzinfo=utc) def location(self, obj): return PackagesSitemap.location(self, obj) + 'files/' def lastmod(self, obj): - return obj.files_last_update + update = obj.files_last_update + if update is None: + return None + return max(update, self.lastmod_min) class PackageGroupsSitemap(Sitemap): |