Allow for EVE API key claiming if they're already in the DB. - Thanks Dorijan and Nil'kandra

This commit is contained in:
2011-10-07 09:13:11 +01:00
parent feb4528c97
commit 57b3a8f654
2 changed files with 3 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ class EveAPIForm(forms.ModelForm):
raise forms.ValidationError("You cannot change your API User ID")
else:
try:
eaccount = EVEAccount.objects.get(api_user_id=self.cleaned_data['api_user_id'])
eaccount = EVEAccount.objects.get(api_user_id=self.cleaned_data['api_user_id'], user__isnull=False)
except EVEAccount.DoesNotExist:
pass
else: