Fixed API key updating, removed the ability for people to remove API keys

This commit is contained in:
2011-07-07 19:37:11 +01:00
parent 4ff890077f
commit 08fe37fe4b
5 changed files with 26 additions and 13 deletions

View File

@@ -56,11 +56,11 @@ def eveapi_update(request, userid, post_save_redirect='/'):
if request.method == 'POST':
form = EveAPIForm(request.POST, instance=acc)
if form.is_valid():
if form.has_changed() and ('api_key' in form.changed_data or 'api_user_id' in form.changed_data):
acc = form.save()
if form.has_changed() and ('api_key' in form.changed_data):
#acc = form.save()
task = import_apikey_result.delay(api_key=acc.api_key, api_userid=acc.api_user_id, user=request.user.id)
try:
task.wait(10)
task.wait(30)
except celery.exceptions.TimeoutError:
msg = "The addition of your API key is still processing, please check back in a minute or so."
except DocumentRetrievalError: