fix: store id for shipping zone
This commit is contained in:
parent
6ff1997d36
commit
f95db75495
1 changed files with 2 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ class PartialStall(BaseModel):
|
||||||
wallet: str
|
wallet: str
|
||||||
name: str
|
name: str
|
||||||
currency: str = "sat"
|
currency: str = "sat"
|
||||||
shipping_zones: List[PartialZone] = []
|
shipping_zones: List[Zone] = []
|
||||||
config: StallConfig = StallConfig()
|
config: StallConfig = StallConfig()
|
||||||
|
|
||||||
def validate_stall(self):
|
def validate_stall(self):
|
||||||
|
|
@ -114,5 +114,5 @@ class Stall(PartialStall):
|
||||||
def from_row(cls, row: Row) -> "Stall":
|
def from_row(cls, row: Row) -> "Stall":
|
||||||
stall = cls(**dict(row))
|
stall = cls(**dict(row))
|
||||||
stall.config = StallConfig(**json.loads(row["meta"]))
|
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
|
return stall
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue