From 6b12a0c6f05150c1aac71c946f71b8eaeecc81d2 Mon Sep 17 00:00:00 2001 From: CircuitSacul Date: Thu, 10 Aug 2023 19:50:37 -0400 Subject: [PATCH] fix TTL for item insert --- detaorm/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detaorm/client.py b/detaorm/client.py index 6b5e7c6..6009d4f 100644 --- a/detaorm/client.py +++ b/detaorm/client.py @@ -189,7 +189,7 @@ async def insert_item( expire_at: The time at which the item should expire (UTC timetamp). expire_in: The time until this item should expire.""" - json = _with_ttl({"item": item}, expire_at, expire_in) + json = {"item": _with_ttl(item, expire_at, expire_in)} url = self._build_url(base_name, "items") resp = await self._session.post(url, json=json) return t.cast(RAW_ITEM, await resp.json())