Fix silly mistake involving database creation.
This commit is contained in:
parent
4316a3cd68
commit
b8b116328d
|
@ -30,12 +30,12 @@ class OpStatus(enum.Enum):
|
|||
print(termcolor.colored(self.output, self.color))
|
||||
|
||||
|
||||
def create_db(db_url, database):
|
||||
db_exists = requests.get(f'{db_url}/{database}')
|
||||
def create_db(db_url, database_name):
|
||||
db_exists = requests.get(f'{db_url}/{database_name}')
|
||||
if db_exists.status_code == http.HTTPStatus.OK:
|
||||
return OpStatus.SKIP
|
||||
|
||||
db_creation = requests.put(f'{db_url}/{database}')
|
||||
db_creation = requests.put(f'{db_url}/{database_name}')
|
||||
create_status = OpStatus.FAILED
|
||||
if db_creation.status_code == http.HTTPStatus.CREATED:
|
||||
create_status = OpStatus.OK
|
||||
|
|
Loading…
Reference in New Issue