Enforce non-optional ktid and kt_receiver for portal DB objects
This commit is contained in:
parent
f8a50f1201
commit
00c0090c19
|
@ -50,7 +50,7 @@ class Portal:
|
||||||
data = {**row}
|
data = {**row}
|
||||||
ktid = data.pop("ktid")
|
ktid = data.pop("ktid")
|
||||||
kt_receiver = data.pop("kt_receiver")
|
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
|
@classmethod
|
||||||
def _from_optional_row(cls, row: Record | None) -> Portal | None:
|
def _from_optional_row(cls, row: Record | None) -> Portal | None:
|
||||||
|
|
Loading…
Reference in New Issue