diff --git a/app/routers/web.py b/app/routers/web.py index ba3ceea..af536b5 100644 --- a/app/routers/web.py +++ b/app/routers/web.py @@ -736,7 +736,7 @@ def postcard_create( card_number: str = Form(...), status: str = Form(...), recipient_name: str = Form(""), - country: str = Form(""), + country_to: str = Form(""), country_from: str = Form(""), send_time: str = Form(""), arrival_time: str = Form(""), @@ -778,7 +778,7 @@ def postcard_create( status=status, recipient_name=recipient_name or None, country_from=(country_from.strip().upper() if country_from else profile.country), - country_to=(country.strip().upper() if country else None), + country_to=(country_to.strip().upper() if country_to else None), send_time=_parse_dt(send_time), arrival_time=_parse_dt(arrival_time), sender_name=sender_name or None, @@ -823,7 +823,7 @@ def postcard_update( card_number: str = Form(...), status: str = Form(...), recipient_name: str = Form(""), - country: str = Form(""), + country_to: str = Form(""), country_from: str = Form(""), send_time: str = Form(""), arrival_time: str = Form(""), @@ -869,7 +869,7 @@ def postcard_update( pc.status = status pc.recipient_name = recipient_name or None pc.country_from = country_from.strip().upper() if country_from else pc.country_from - pc.country_to = country or None + pc.country_to = country_to or None pc.send_time = _parse_dt(send_time) pc.arrival_time = None if status == "sent" else _parse_dt(arrival_time) pc.sender_name = sender_name or None