Include 'files_last_update' in package sitemap query

We need this for the package files sitemap; else we are doing one query
per package to retrieve this field. Whoops.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2013-01-18 20:15:40 -06:00
parent cba22a378b
commit 7313a7914d

View File

@ -14,7 +14,8 @@ class PackagesSitemap(Sitemap):
def items(self):
return Package.objects.normal().filter(repo__staging=False).only(
'pkgname', 'last_update', 'repo__name', 'arch__name').order_by()
'pkgname', 'last_update', 'files_last_update',
'repo__name', 'arch__name').order_by()
def lastmod(self, obj):
return obj.last_update