Fixing admin user and project creation 60/7560/1
authorEduardo Sousa <eduardo.sousa@canonical.com>
Tue, 28 May 2019 13:02:59 +0000 (14:02 +0100)
committerEduardo Sousa <eduardo.sousa@canonical.com>
Tue, 28 May 2019 13:03:04 +0000 (14:03 +0100)
Admin user and project should only be created when
internal is being used.

Change-Id: Id91ff04585a188b6a19c1b450bedae748009dc55
Signed-off-by: Eduardo Sousa <eduardo.sousa@canonical.com>
osm_nbi/engine.py

index e7dee84..2bf6169 100644 (file)
@@ -388,5 +388,7 @@ class Engine(object):
             self.upgrade_db(db_version, target_version)
 
         # create user admin if not exist
-        self.create_admin()
+        if not self.auth:
+            self.create_admin()
+        
         return