bug: unhashable Config in CalDAV.get_events

This commit is contained in:
Jörn-Michael Miehe 2023-10-26 23:10:51 +02:00
parent 0567edf87e
commit afc859dff7
2 changed files with 9 additions and 2 deletions

View file

@ -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"

View file

@ -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: