summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-02-03 22:08:21 +0100
committerDan McGee <dan@archlinux.org>2013-02-03 22:08:21 +0100
commit508d06af810c787b2644331444279407ccfa27af (patch)
tree377e89db9c82a7ec66f49d0270b589b39c5bcfa8 /main
parentd63a800348f81823f157ec9ed03f9985308c3ea3 (diff)
downloadarchweb-508d06af810c787b2644331444279407ccfa27af.tar.gz
archweb-508d06af810c787b2644331444279407ccfa27af.tar.xz
Use DeveloperKey model on package page and reports
This introduces the new model to the package page so subkey signings show up as attributed to the original developer. We also teach the mismatched signatures report to recognize all keys and subkeys of a given developer, cutting down on some of the bogus results. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r--main/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py
index 40466d6..53a24ff 100644
--- a/main/models.py
+++ b/main/models.py
@@ -11,6 +11,7 @@ from django.utils.timezone import now
from .fields import PositiveBigIntegerField
from .utils import cache_function, set_created_field
+from devel.models import DeveloperKey
from packages.alpm import AlpmAPI
@@ -153,8 +154,9 @@ class Package(models.Model):
sig = self.signature
if sig and sig.key_id:
try:
- user = User.objects.get(
- userprofile__pgp_key__endswith=sig.key_id)
+ matching_key = DeveloperKey.objects.select_related(
+ 'owner').get(key=sig.key_id, owner_id__isnull=False)
+ user = matching_key.owner
except User.DoesNotExist:
user = None
return user