Fix properties

This commit is contained in:
Marek Wolan
2025-01-31 15:29:10 +00:00
parent 20e5177544
commit 8feb2db954
4 changed files with 16 additions and 38 deletions

View File

@@ -35,9 +35,6 @@ class DatabaseService(Service, identifier="DatabaseService"):
config: "DatabaseService.ConfigSchema" = Field(default_factory=lambda: DatabaseService.ConfigSchema())
password: Optional[str] = None
"""Password that needs to be provided by clients if they want to connect to the DatabaseService."""
backup_server_ip: IPv4Address = None
"""IP address of the backup server."""
@@ -60,6 +57,10 @@ class DatabaseService(Service, identifier="DatabaseService"):
"""Convenience property for accessing the password."""
return self.config.db_password
@password.setter
def password(self, val: str) -> None:
self.config.db_password = val
def install(self):
"""
Perform first-time setup of the DatabaseService.