Fix bug 744
[osm/NBI.git] / osm_nbi / engine.py
index e7dee84..f7bc012 100644 (file)
@@ -138,7 +138,7 @@ class Engine(object):
 
                 for _, value in resources_to_operations["resources_to_operations"].items():
                     if value not in self.operations:
 
                 for _, value in resources_to_operations["resources_to_operations"].items():
                     if value not in self.operations:
-                        self.operations += value
+                        self.operations += [value]
 
             if config["authentication"]["backend"] == "keystone":
                 self.map_from_topic_to_class["users"] = UserTopicAuth
 
             if config["authentication"]["backend"] == "keystone":
                 self.map_from_topic_to_class["users"] = UserTopicAuth
@@ -388,5 +388,7 @@ class Engine(object):
             self.upgrade_db(db_version, target_version)
 
         # create user admin if not exist
             self.upgrade_db(db_version, target_version)
 
         # create user admin if not exist
-        self.create_admin()
+        if not self.auth:
+            self.create_admin()
+        
         return
         return