summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-10-01 16:36:30 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-10-01 16:36:30 -0300
commitbaa02367ecd75932ed785efe44b129c8d773696e (patch)
tree5a594ae5f397387f77c68d03f902a1dc60e48340
parentb208c5648d4fbf810b65283db4a6eae151839570 (diff)
downloadaskbot-baa02367ecd75932ed785efe44b129c8d773696e.tar.gz
askbot-baa02367ecd75932ed785efe44b129c8d773696e.tar.bz2
askbot-baa02367ecd75932ed785efe44b129c8d773696e.zip
added a fix for problem described at http://askbot.org/en/question/656/keyerror-on-clicking-manage-login-methods and added transifex config
-rw-r--r--.tx/config8
-rw-r--r--askbot/deps/django_authopenid/views.py24
2 files changed, 25 insertions, 7 deletions
diff --git a/.tx/config b/.tx/config
new file mode 100644
index 00000000..ddc84185
--- /dev/null
+++ b/.tx/config
@@ -0,0 +1,8 @@
+[main]
+host = https://www.transifex.net
+
+[askbot.txo]
+file_filter = askbot/locale/<lang>/LC_MESSAGES/django.po
+source_file = askbot/locale/en/LC_MESSAGES/django.po
+source_lang = en
+
diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py
index 63c3b1f0..5a81f702 100644
--- a/askbot/deps/django_authopenid/views.py
+++ b/askbot/deps/django_authopenid/views.py
@@ -550,13 +550,23 @@ def show_signin_view(
for login_method in existing_login_methods:
if login_method.provider_name == 'facebook':
continue#it is disabled
- provider_data = providers[login_method.provider_name]
- if provider_data['type'] == 'password':
- #only external password logins will not be deletable
- #this is because users with those can lose access to their accounts permanently
- login_method.is_deletable = provider_data.get('password_changeable', False)
- else:
- login_method.is_deletable = True
+ try:
+ provider_data = providers[login_method.provider_name]
+ if provider_data['type'] == 'password':
+ #only external password logins will not be deletable
+ #this is because users with those can lose access to their accounts permanently
+ login_method.is_deletable = provider_data.get('password_changeable', False)
+ else:
+ login_method.is_deletable = True
+ except KeyError:
+ logging.critical(
+ 'login method %s is no longer available '
+ 'please delete records for this login method '
+ 'from the UserAssociation table',
+ login_method.provider_name
+ )
+ continue
+
if view_subtype == 'default':