From f95db754953023c0c43131f351459d9f585f13aa Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 2 Mar 2023 13:41:10 +0200 Subject: [PATCH] fix: store id for shipping zone --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 060b462..e52ba6e 100644 --- a/models.py +++ b/models.py @@ -66,7 +66,7 @@ class PartialStall(BaseModel): wallet: str name: str currency: str = "sat" - shipping_zones: List[PartialZone] = [] + shipping_zones: List[Zone] = [] config: StallConfig = StallConfig() def validate_stall(self): @@ -114,5 +114,5 @@ class Stall(PartialStall): def from_row(cls, row: Row) -> "Stall": stall = cls(**dict(row)) stall.config = StallConfig(**json.loads(row["meta"])) - stall.shipping_zones = [PartialZone(**z) for z in json.loads(row["zones"])] + stall.shipping_zones = [Zone(**z) for z in json.loads(row["zones"])] return stall