fix(session): coerce null session metadata to empty dict
This commit is contained in:
@@ -138,6 +138,8 @@ class Session:
|
||||
last_consolidated: int = 0 # Number of messages already consolidated to files
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
if not isinstance(self.metadata, dict):
|
||||
self.metadata = {}
|
||||
# An out-of-range offset (corrupt metadata) would hide all history; reset it.
|
||||
if (
|
||||
isinstance(self.last_consolidated, bool)
|
||||
|
||||
Reference in New Issue
Block a user