Skip to content

Commit

Permalink
ref: fix types for middleware.acesss_log (#79755)
Browse files Browse the repository at this point in the history
<!-- Describe your PR here. -->
  • Loading branch information
asottile-sentry authored Oct 25, 2024
1 parent dbc791c commit cf1a887
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ module = [
"sentry.integrations.vsts.repository",
"sentry.integrations.vsts_extension.integration",
"sentry.issues.search",
"sentry.middleware.access_log",
"sentry.middleware.auth",
"sentry.middleware.ratelimit",
"sentry.middleware.superuser",
Expand Down
6 changes: 3 additions & 3 deletions src/sentry/middleware/access_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def _create_api_access_log(
Create a log entry to be used for api metrics gathering
"""
try:
try:
view = request.resolver_match._func_path
except AttributeError:
if request.resolver_match is None:
view = "Unknown"
else:
view = request.resolver_match._func_path

request_auth = _get_request_auth(request)
token_type = str(_get_token_name(request_auth))
Expand Down

0 comments on commit cf1a887

Please sign in to comment.