From 083cb2874fadcc4ddc7be75b0bb1a8e1dde877b6 Mon Sep 17 00:00:00 2001 From: megahomyak Date: Mon, 14 Mar 2022 20:01:46 +0500 Subject: [PATCH] Stupid goddamn attachments bug is now fixed --- netschoolapi/netschoolapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netschoolapi/netschoolapi.py b/netschoolapi/netschoolapi.py index 40c96d5..2fb8266 100644 --- a/netschoolapi/netschoolapi.py +++ b/netschoolapi/netschoolapi.py @@ -250,7 +250,7 @@ async def attachments( response = response.json() if not response: return [] - attachments_json = response.json()[0]['attachments'] + attachments_json = response[0]['attachments'] attachments = schemas.Attachment().load(attachments_json, many=True) return [data.Attachment(**attachment) for attachment in attachments]