mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Added more validation for Eve API input
This commit is contained in:
@@ -10,6 +10,9 @@ class EveAPIForm(forms.Form):
|
||||
description = forms.CharField(max_length=100)
|
||||
|
||||
def clean(self):
|
||||
if not self.cleaned_data['user_id'].isdigit():
|
||||
raise forms.ValidationError("API User ID provided is not valid")
|
||||
|
||||
try:
|
||||
eaccount = EVEAccount.objects.get(api_user_id=self.cleaned_data['user_id'])
|
||||
except EVEAccount.DoesNotExist:
|
||||
|
||||
Reference in New Issue
Block a user