diff --git a/common/djangoapps/external_auth/djangostore.py b/common/djangoapps/external_auth/djangostore.py index 3a6848f11f..8b830e0aa9 100644 --- a/common/djangoapps/external_auth/djangostore.py +++ b/common/djangoapps/external_auth/djangostore.py @@ -87,7 +87,7 @@ class DjangoOpenIDStore(OpenIDStore): cache.delete(key) removed = True else: - assoc = associations.pop(handle) + assoc = associations.pop(handle, None) if assoc: cache.set(key, associations, DEFAULT_ASSOCIATIONS_TIMEOUT) removed = True