diff --git a/app/db.py b/app/db.py index 950e772c1..9eb8a651e 100644 --- a/app/db.py +++ b/app/db.py @@ -259,7 +259,7 @@ def table_exists(self, table_name): res = self.select('SELECT * FROM information_schema.tables WHERE table_name = %s and table_schema = %s', (table_name, db)) elif self.db_type == DataBase.MONGO: - return table_name in self.connection.collection_names() + return table_name in self.connection.list_collection_names() else: return False diff --git a/app/templates/inflog.html b/app/templates/inflog.html index b80b6274c..5710a92a7 100644 --- a/app/templates/inflog.html +++ b/app/templates/inflog.html @@ -2,6 +2,16 @@ {% block title %}Infrastructure Log{% endblock %} {% block content %} + +

@@ -29,7 +39,7 @@

diff --git a/app/templates/infrastructures.html b/app/templates/infrastructures.html index 140407652..9679036de 100644 --- a/app/templates/infrastructures.html +++ b/app/templates/infrastructures.html @@ -141,9 +141,9 @@

My Infrastructures

-
+

- +
@@ -221,6 +221,7 @@

My Infrastructures

+ diff --git a/app/tests/test_db.py b/app/tests/test_db.py index cd4d15105..3945a7172 100644 --- a/app/tests/test_db.py +++ b/app/tests/test_db.py @@ -75,7 +75,7 @@ def test_mongo_db(self, mongo): db = DataBase(db_url) self.assertTrue(db.connect()) - database.collection_names.return_value = ['table1'] + database.list_collection_names.return_value = ['table1'] res = db.table_exists("test") self.assertFalse(res) res = db.table_exists("table1")