aboutsummaryrefslogtreecommitdiffstats
path: root/app/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/utils.py')
-rw-r--r--app/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/utils.py b/app/utils.py
index d513ae9..824d370 100644
--- a/app/utils.py
+++ b/app/utils.py
@@ -1,4 +1,5 @@
from app.Item import Item
+from dataclasses import asdict
def get_param(key: str, params: dict[str, str]) -> str:
@@ -9,8 +10,8 @@ def get_param(key: str, params: dict[str, str]) -> str:
def item_to_dict(item: Item) -> dict[str, str]:
- raise NotImplemented()
+ return asdict(item)
def dict_to_item(d: dict[str, str]) -> Item:
- raise NotImplemented()
+ return Item(**d)