X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/07fe485fb0a119fb87f8ec948185b5acdd65300e..0bd53bfd0a08e9949651ec35bf22048db8e740d9:/forum/authentication/__init__.py 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() ]) +