From 451a8b9bc3c6d8291ca1e5e1659b41e1661436aa Mon Sep 17 00:00:00 2001 From: VladislavOstapov Date: Sun, 23 Apr 2023 17:58:49 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D1=83=20=D0=BC=D0=B5=D1=82=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0=20http=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=B0=20=D0=B2=20media.get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_methods.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/api_methods.py b/api/api_methods.py index 2090f09..347dd2b 100755 --- a/api/api_methods.py +++ b/api/api_methods.py @@ -695,9 +695,6 @@ class ApiMedia: value_min=0, value_max=1000000000), ], returns="медиа, в противном случае ошибку") async def get(request, access_token, media_id): - if request.method != "GET": - return make_error_object(Exception(API_ERROR_INVALID_REQUEST, "method must be executed http GET method")) - m = await Media.objects.filter(Q(owner=access_token.user) | Q(owner__accountavatar__photo=media_id) | Q(owner__accountavatar__profile_background_id=media_id)).filter(pk=media_id).afirst()