Commit f40f6bc6 authored by ibuler's avatar ibuler

[Bugfix] 修复accekt的错误

parent 55ff8254
...@@ -83,7 +83,7 @@ class TerminalTokenApi(APIView): ...@@ -83,7 +83,7 @@ class TerminalTokenApi(APIView):
if not terminal.is_accepted: if not terminal.is_accepted:
return Response("Terminal was not accepted yet", status=400) 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) return Response("No access key generate", status=401)
access_key = terminal.user.access_key.first() access_key = terminal.user.access_key.first()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment