From f40f6bc61e34a4eb7248d8e1fd92f8886faef9d4 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 13 Dec 2018 10:06:51 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8Daccekt=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/api/v1/terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/terminal/api/v1/terminal.py b/apps/terminal/api/v1/terminal.py index 744aa933c..7ab15d381 100644 --- a/apps/terminal/api/v1/terminal.py +++ b/apps/terminal/api/v1/terminal.py @@ -83,7 +83,7 @@ class TerminalTokenApi(APIView): if not terminal.is_accepted: return Response("Terminal was not accepted yet", status=400) - if not terminal.user or not terminal.user.access_key.all(): + if not terminal.user or not terminal.user.access_key: return Response("No access key generate", status=401) access_key = terminal.user.access_key.first()