From 00c0090c19b6ad0b3c538b92bbb81cf748773609 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Wed, 9 Mar 2022 02:28:41 -0500 Subject: [PATCH] Enforce non-optional ktid and kt_receiver for portal DB objects --- matrix_appservice_kakaotalk/db/portal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix_appservice_kakaotalk/db/portal.py b/matrix_appservice_kakaotalk/db/portal.py index ead8b38..6a97212 100644 --- a/matrix_appservice_kakaotalk/db/portal.py +++ b/matrix_appservice_kakaotalk/db/portal.py @@ -50,7 +50,7 @@ class Portal: data = {**row} ktid = data.pop("ktid") kt_receiver = data.pop("kt_receiver") - return cls(**data, ktid=Long.from_optional_bytes(ktid), kt_receiver=Long.from_optional_bytes(kt_receiver)) + return cls(**data, ktid=Long.from_bytes(ktid), kt_receiver=Long.from_bytes(kt_receiver)) @classmethod def _from_optional_row(cls, row: Record | None) -> Portal | None: