From c0989f12824e3743a362fc6536fb7e4ec50f46b0 Mon Sep 17 00:00:00 2001 From: VladislavOstapov Date: Wed, 5 Apr 2023 14:23:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20media.get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_methods.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api_methods.py b/api/api_methods.py index 46c320f..0b628e4 100755 --- a/api/api_methods.py +++ b/api/api_methods.py @@ -769,8 +769,8 @@ class ApiMedia: 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__account__photo_id=media_id) | - Q(owner__account__profile_background_id=media_id)).filter(pk=media_id).afirst() + Q(owner__accountavatar__photo=media_id) | + Q(owner__accountavatar__profile_background_id=media_id)).filter(pk=media_id).afirst() if m is not None: try: