summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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':