mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 06:55:45 +00:00
args_reset_db added, fixed error with incorrect handling of kwargs
This commit is contained in:
parent
0e50b2e869
commit
58982c2fcf
@ -26,7 +26,8 @@ class TarantoolDB:
|
|||||||
self.db_connect = tarantool.connect(host=self.host, port=self.port)
|
self.db_connect = tarantool.connect(host=self.host, port=self.port)
|
||||||
self.init_path = Config().get()["database"]["init_config"]["absolute_path"]
|
self.init_path = Config().get()["database"]["init_config"]["absolute_path"]
|
||||||
self.drop_path = Config().get()["database"]["drop_config"]["absolute_path"]
|
self.drop_path = Config().get()["database"]["drop_config"]["absolute_path"]
|
||||||
if reset_database or kwargs.get("kwargs").get("reset_database"):
|
args_reset_db = kwargs.get("kwargs").get("reset_database") if "kwargs" in kwargs else None
|
||||||
|
if reset_database or args_reset_db is True:
|
||||||
self.drop_database()
|
self.drop_database()
|
||||||
self.init_database()
|
self.init_database()
|
||||||
self._reconnect()
|
self._reconnect()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user