From a2d019e1d6c82021e97943b440a18f0dbb84aa3f Mon Sep 17 00:00:00 2001 From: firedotguy Date: Fri, 6 Feb 2026 21:43:03 +0300 Subject: [PATCH] fix: JSONDecodeError when view post --- itd/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/itd/client.py b/itd/client.py index 45188bb..d4b56c5 100644 --- a/itd/client.py +++ b/itd/client.py @@ -790,6 +790,8 @@ class Client: NotFound: Пост не найден """ res = view_post(self.token, id) + if res.status_code == 204: + return if res.json().get('error', {}).get('code') == 'NOT_FOUND': raise NotFound('Post') res.raise_for_status()