Mercurial > libervia-backend
changeset 4026:fe4725bf42fb
core (memory/sqla): be sure to have a dict when serialising History.extra:
`extra` can be None, this patch avoid this value when serialising it by using an empty
dict.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 24 Mar 2023 10:29:48 +0100 |
parents | 44abce96ac6b |
children | 26c3e1bc7fb7 |
files | sat/memory/sqla_mapping.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/memory/sqla_mapping.py Thu Mar 23 17:08:41 2023 +0100 +++ b/sat/memory/sqla_mapping.py Fri Mar 24 10:29:48 2023 +0100 @@ -273,7 +273,7 @@ return f"History<{self.source_jid.full()}->{self.dest_jid.full()} [{dt}]>" def serialise(self): - extra = self.extra + extra = self.extra or {} if self.origin_id is not None: extra["origin_id"] = self.origin_id if self.stanza_id is not None: