mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 19:36:20 -05:00
Allowing empty expiration date.
This commit is contained in:
parent
d15972ddbe
commit
241b6175c6
1 changed files with 2 additions and 2 deletions
|
|
@ -14,12 +14,12 @@ class ItemPostRequest:
|
|||
count: Union[str, Decimal]
|
||||
category: str
|
||||
subcategory: str
|
||||
expiration_date: Optional[float]
|
||||
expiration_date: Optional[str]
|
||||
|
||||
def __post_init__(self):
|
||||
self.item_size = Decimal(self.item_size) if self.item_size else None
|
||||
self.count = Decimal(self.count) if self.count else None
|
||||
self.expiration_date = from_timestamp(self.expiration_date) if self.expiration_date else None
|
||||
self.expiration_date = from_timestamp(float(self.expiration_date)) if self.expiration_date else None
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue