Skip to content

Commit b0b0bb2

Browse files
authored
Merge pull request #555 from nickcdon/main
🐛 修复工具循环引用问题
2 parents a2b6c01 + 46ad7db commit b0b0bb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • server/projects/main/apps/scan_conf/core

server/projects/main/apps/scan_conf/core/basemgr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# 项目内
2121
from apps.scan_conf import models
2222
from apps.scan_conf.api_filters import base as base_filters
23-
from apps.codeproj.core.scmmgr import ScmAuthManager
2423
from apps.base.basemodel import CDBaseModel
2524

2625
logger = logging.getLogger(__name__)
@@ -239,6 +238,7 @@ def validate_scm_auth(cls, scm_auth, user):
239238
scm_ssh = scm_auth.get("scm_ssh")
240239
if auth_type == models.ScmAuth.ScmAuthTypeEnum.OAUTH:
241240
if not scm_oauth:
241+
from apps.codeproj.core.scmmgr import ScmAuthManager
242242
# 如果没有传递scm_oauth
243243
scm_oauth = ScmAuthManager.get_scm_auth(user)
244244
if not scm_oauth or scm_oauth.user != user:

0 commit comments

Comments
 (0)