Skip to content

Commit

Permalink
[FIX] monitoring_log_requests: response_status_code
Browse files Browse the repository at this point in the history
the response status code would not be properly logged -> fix the code
  • Loading branch information
gurneyalex committed Aug 27, 2024
1 parent bd561bc commit dc94374
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exclude: |
^base_fileurl_field/|
^cloud_platform_exoscale/|
^cloud_platform_ovh/|
^monitoring_log_requests/|
^monitoring_statsd/|
^test_base_fileurl_field/|
# END NOT INSTALLABLE ADDONS
Expand Down
4 changes: 2 additions & 2 deletions monitoring_log_requests/models/ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def _monitoring_info(cls, request, response, begin, end):
# response things
"response_status_code": None,
}
if hasattr(request, "status_code"):
info["status_code"] = response.status_code
if hasattr(response, "status_code"):
info["response_status_code"] = response.status_code
if hasattr(request, "session"):
info.update(
{
Expand Down

0 comments on commit dc94374

Please sign in to comment.