From 46a45bd085d7a21ccfe3164bd84aed739dcd8a30 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Mon, 11 Dec 2023 14:42:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20api-key=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/auth/authenticate.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/common/auth/authenticate.py b/apps/common/auth/authenticate.py index 74171f7dd..c5339b50c 100644 --- a/apps/common/auth/authenticate.py +++ b/apps/common/auth/authenticate.py @@ -41,7 +41,7 @@ class TokenAuth(TokenAuthentication): application_api_key = QuerySet(ApplicationApiKey).filter(secret_key=auth).first() if application_api_key is None: raise AppAuthenticationFailed(500, "secret_key 无效") - if not application_api_key.application.api_key_is_active: + if not application_api_key.is_active: raise AppAuthenticationFailed(500, "secret_key 无效") permission_list = [Permission(group=Group.APPLICATION, operate=Operate.USE, diff --git a/pyproject.toml b/pyproject.toml index d1ae05745..5447e83dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "smart-doc" +name = "maxkb" version = "0.1.0" description = "智能客服系统" authors = ["shaohuzhang1 "]