diff --git a/api/ovdashboard_api/core/config.py b/api/ovdashboard_api/core/config.py index 6c2be03..26123cf 100644 --- a/api/ovdashboard_api/core/config.py +++ b/api/ovdashboard_api/core/config.py @@ -89,6 +89,13 @@ class Config(BaseModel): Main representation of "config.txt". """ + def __hash__(self) -> int: + """ + Fake hash (the config is always the config) + """ + + return hash("config") + image_dir: str = "image" text_dir: str = "text" file_dir: str = "file" diff --git a/api/ovdashboard_api/core/webdav.py b/api/ovdashboard_api/core/webdav.py index cdb3052..860685b 100644 --- a/api/ovdashboard_api/core/webdav.py +++ b/api/ovdashboard_api/core/webdav.py @@ -15,10 +15,10 @@ from .settings import SETTINGS _logger = logging.getLogger(__name__) -def davkey(first, _, *args, **kwargs): +def davkey(name, _, *args, **kwargs): """Return a cache key for use with cached methods.""" - return hashkey(first, *args, **kwargs) + return hashkey(name, *args, **kwargs) class WebDAV: