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.
This commit is contained in:
Goffi 2023-03-24 10:29:48 +01:00
commit 66842072e3

View file

@ -273,7 +273,7 @@ class History(Base):
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: