diff --git a/src/attributes.py b/src/attributes.py index 0ac5e86..64b8389 100644 --- a/src/attributes.py +++ b/src/attributes.py @@ -167,7 +167,7 @@ class Attributes: """Setter function with error checking for the database name""" # Update the database class of the name change - self.database.database_name = value_input + self.database._database_name = value_input # Set the name in the ga attribute self._database_name = value_input diff --git a/src/database/sql_database.py b/src/database/sql_database.py index 19b73d0..669fbde 100644 --- a/src/database/sql_database.py +++ b/src/database/sql_database.py @@ -12,7 +12,7 @@ class SQL_Database: def __init__(self): self.conn = None self.config_id = None - self.database_name = 'database.db' + self._database_name = 'database.db' def get_current_config(self): @@ -253,6 +253,16 @@ class SQL_Database: return formated_query_data; + @property + def database_name(self): + return self._database_name + + + @database_name.setter + def database_name(self, value_input): + raise Exception("Invalid usage, please use ga.database_name instead.") + + @property def conn(self): """Getter function for conn"""