Skip to content

Commit

Permalink
SyntaxWarning: invalid escape sequence fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalanandl177 committed Mar 18, 2024
1 parent 0153ba6 commit 36bcd34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drf_api_logger/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def mask_sensitive_data(data, mask_api_parameters=False):
for sensitive_key in SENSITIVE_KEYS:
data = re.sub('({}=)(.*?)($|&)'.format(sensitive_key),
'\\g<1>***FILTERED***\\g<3>'.format(sensitive_key.upper()), data)
# new code

if type(data) is list:
data = [mask_sensitive_data(item) for item in data]
return data
Expand Down

0 comments on commit 36bcd34

Please sign in to comment.