summaryrefslogtreecommitdiffstats
path: root/packages/utils.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-01-25 16:16:48 +0100
committerDan McGee <dan@archlinux.org>2014-01-25 16:16:48 +0100
commit3faeab7d548552bfaa6719b75be9b6450b5031bd (patch)
treef195b4e92f883aebf40c6148e544c13305c344a8 /packages/utils.py
parentfaf196aa521e794aed905122600d12f1c9ab1f0e (diff)
downloadarchweb-3faeab7d548552bfaa6719b75be9b6450b5031bd.tar.gz
archweb-3faeab7d548552bfaa6719b75be9b6450b5031bd.tar.xz
Add 'Latest Update' column to stale package relations
This helps when doing the irregular cleanup of these things and making sure a relation has been stale for some time and not just a couple minutes or hours. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/utils.py')
-rw-r--r--packages/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/utils.py b/packages/utils.py
index 6ec3948..0f47f17 100644
--- a/packages/utils.py
+++ b/packages/utils.py
@@ -243,7 +243,8 @@ SELECT DISTINCT id
cursor = connection.cursor()
cursor.execute(sql, [PackageRelation.MAINTAINER])
to_fetch = [row[0] for row in cursor.fetchall()]
- relations = PackageRelation.objects.select_related('user').filter(
+ relations = PackageRelation.objects.select_related(
+ 'user', 'user__userprofile').filter(
id__in=to_fetch)
return relations