From 72ba19678d7d1e5dd4d651e2cd8a307a6e281e86 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 14 Mar 2010 10:21:54 +0000 Subject: [PATCH] Removed excess clean function --- sso/forms.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sso/forms.py b/sso/forms.py index 16871c3..758b34b 100644 --- a/sso/forms.py +++ b/sso/forms.py @@ -37,16 +37,6 @@ def UserServiceAccountForm(user): character = forms.ChoiceField(chars) service = forms.ChoiceField(services) - def clean_username(self): - field = self.cleaned_data.get('username', '') - - # Checks that usernames consist of letters and numbers only - if not re.match("^[A-Za-z0-9_-]*$", field): - raise forms.ValidationError("Invalid character in username, use letters and numbers only") - - return field - - def clean(self): if not self.cleaned_data['character'].corporation.group in self.cleaned_data['service'].groups.all(): raise form.ValidationError("%s is not in a corporation allowed to access %s" % (self.cleaned_data['character'].name, self.cleaned_data['service'])