Skip to content

Commit 82b2f80

Browse files
authored
Fix the summary in opera log middleware (#816)
1 parent f417374 commit 82b2f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/middleware/opera_log_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ async def dispatch(self, request: Request, call_next: Any) -> Response:
7474

7575
# 此信息只能在请求后获取
7676
_route = request.scope.get('route')
77-
summary = getattr(_route, 'summary') or ''
77+
summary = getattr(_route, 'summary') or '' if _route else ''
7878

7979
try:
8080
# 此信息来源于 JWT 认证中间件

0 commit comments

Comments
 (0)