fix: remove ruff ignore SIM300 (#11810)

This commit is contained in:
barabicu 2024-12-19 19:30:51 +09:00 committed by GitHub
commit d057067543
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 13 deletions

View file

@ -31,7 +31,7 @@ def admin_required(view):
if auth_scheme != "bearer":
raise Unauthorized("Invalid Authorization header format. Expected 'Bearer <api-key>' format.")
if dify_config.ADMIN_API_KEY != auth_token:
if auth_token != dify_config.ADMIN_API_KEY:
raise Unauthorized("API key is invalid.")
return view(*args, **kwargs)