summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/devel/views.py b/devel/views.py
index 475376ad..25ad2ccf 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -102,6 +102,13 @@ class ProfileForm(forms.Form):
return self.cleaned_data
class UserProfileForm(forms.ModelForm):
+ def clean_pgp_key(self):
+ data = self.cleaned_data['pgp_key']
+ # strip 0x prefix if provided; store uppercase
+ if data.startswith('0x'):
+ data = data[2:]
+ return data.upper()
+
class Meta:
model = UserProfile
exclude = ['allowed_repos', 'user']