diff --git a/Claude outputs/main.py b/Claude outputs/main.py index 0c8eeb3..a39f77f 100644 --- a/Claude outputs/main.py +++ b/Claude outputs/main.py @@ -609,6 +609,7 @@ async def update_order(order_id: int, customer: str = None, description: str = N "description": description if description is not None else current_card.get("description", ""), "type": current_card.get("type", "plain"), "order": current_card.get("order", 999), + "owner": current_card["owner"], } if due_date is not None: body["duedate"] = _as_calendar_local(datetime.fromisoformat(due_date)).isoformat() diff --git a/Claude outputs/tests/test_orders.py b/Claude outputs/tests/test_orders.py index 1c86fd6..7156fa8 100644 --- a/Claude outputs/tests/test_orders.py +++ b/Claude outputs/tests/test_orders.py @@ -379,7 +379,7 @@ def test_orders_endpoint_returns_503_on_deck_error(client): _STACKS_WITH_CARD_55 = [ {"id": 1, "title": "Offen", "cards": [ - {"id": 55, "title": "Feuerwehr Onza", "description": "Helme", "duedate": None, "type": "plain", "order": 999} + {"id": 55, "title": "Feuerwehr Onza", "description": "Helme", "duedate": None, "type": "plain", "order": 999, "owner": "jonny"} ]}, {"id": 2, "title": "In Arbeit", "cards": []}, {"id": 3, "title": "Erledigt", "cards": []}, @@ -407,6 +407,7 @@ async def test_update_order_merges_description_and_keeps_other_fields(): assert body["title"] == "Feuerwehr Onza" assert body["description"] == "20x Handschuhe Groesse L" assert "duedate" not in body + assert body["owner"] == "jonny" @pytest.mark.asyncio @@ -426,7 +427,7 @@ async def test_update_order_localizes_new_due_date(): async def test_update_order_keeps_existing_due_date_when_not_given(): stacks_with_due_date = [ {"id": 1, "title": "Offen", "cards": [ - {"id": 55, "title": "A", "description": "B", "duedate": "2026-09-20T00:00:00+02:00", "type": "plain", "order": 999} + {"id": 55, "title": "A", "description": "B", "duedate": "2026-09-20T00:00:00+02:00", "type": "plain", "order": 999, "owner": "someone-else"} ]}, {"id": 2, "title": "In Arbeit", "cards": []}, {"id": 3, "title": "Erledigt", "cards": []}, @@ -441,6 +442,7 @@ async def test_update_order_keeps_existing_due_date_when_not_given(): _, _, body = put_calls[0].args assert body["duedate"] == "2026-09-20T00:00:00+02:00" assert body["title"] == "Neuer Name" + assert body["owner"] == "someone-else" @pytest.mark.asyncio