From ce061a2e33497b08201db6a41afdfbaa552b7f73 Mon Sep 17 00:00:00 2001 From: freeziyou <80776877@qq.com> Date: Mon, 4 Mar 2024 11:02:12 +0800 Subject: [PATCH] hotfix os import --- server/tasks/lark/chat.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/tasks/lark/chat.py b/server/tasks/lark/chat.py index 64e08ae6..53b5f538 100644 --- a/server/tasks/lark/chat.py +++ b/server/tasks/lark/chat.py @@ -292,11 +292,11 @@ def create_issue( # 这里连三个表查询,所以一次性都查出来 code_users = get_code_users_by_openid([openid] + users) - import tasks - if openid not in code_users: host = os.environ.get("DOMAIN") + import tasks + return tasks.send_manage_fail_message( f"[请点击绑定 GitHub 账号后重试]({host}/api/github/oauth)", app_id, @@ -455,11 +455,11 @@ def sync_issue( # 这里连三个表查询,所以一次性都查出来 code_users = get_code_users_by_openid([openid]) - import tasks - if openid not in code_users: host = os.environ.get("DOMAIN") + import tasks + return tasks.send_manage_fail_message( f"[请点击绑定 GitHub 账号后重试]({host}/api/github/oauth)", app_id,