fix variable name

This commit is contained in:
C.J. May 2025-01-08 00:39:14 -06:00 committed by GitHub
parent f910ef7f1a
commit 4b2765461e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ class MariadbContainer(Container):
def get_credentials(self) -> dict:
"""dict: get credentials for the service"""
password = self.get_config_env('MARIADB_ROOT_PASSWORD')
if root_password is not None:
if password is not None:
username = "root"
else:
username = self.get_config_env('MARIADB_USER')
@ -81,7 +81,7 @@ class MysqlContainer(Container):
def get_credentials(self) -> dict:
"""dict: get credentials for the service"""
password = self.get_config_env('MYSQL_ROOT_PASSWORD')
if root_password is not None:
if password is not None:
username = "root"
else:
username = self.get_config_env('MYSQL_USER')