]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/authentication/__init__.py
Reverting the merges due to unsuccessfull conflict resolvement.
[osqa.git] / forum / authentication / __init__.py
index 79c47a8dd2e05908b96e2e7ea438a2cf72372576..8dbf825a525c2ab49c17a38834961ac6135706ce 100644 (file)
@@ -8,8 +8,7 @@ class ConsumerAndContext:
         self.id = id
         self._consumer = consumer
 
-        if context:
-            context.id = id
+        context.id = id
         self.context = context
 
     @property
@@ -28,7 +27,7 @@ contexts = dict([
         ])
 
 AUTH_PROVIDERS = dict([
-            (name, ConsumerAndContext(name, consumers[name], contexts.get(name, None))) for name in consumers.keys()
+            (name, ConsumerAndContext(name, consumers[name], contexts[name])) for name in consumers.keys()
+            if name in contexts
         ])
 
-