X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/13bee2f2e6aea2d936909861f3ab60bb09821a60..0bd53bfd0a08e9949651ec35bf22048db8e740d9:/forum/authentication/__init__.py?ds=inline diff --git a/forum/authentication/__init__.py b/forum/authentication/__init__.py index 8dbf825..79c47a8 100644 --- a/forum/authentication/__init__.py +++ b/forum/authentication/__init__.py @@ -8,7 +8,8 @@ class ConsumerAndContext: self.id = id self._consumer = consumer - context.id = id + if context: + context.id = id self.context = context @property @@ -27,7 +28,7 @@ contexts = dict([ ]) AUTH_PROVIDERS = dict([ - (name, ConsumerAndContext(name, consumers[name], contexts[name])) for name in consumers.keys() - if name in contexts + (name, ConsumerAndContext(name, consumers[name], contexts.get(name, None))) for name in consumers.keys() ]) +