Skip to content

Commit

Permalink
addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stiwarisemanticbits committed Oct 18, 2024
1 parent a52bf70 commit a11834c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions apps/logging/sensitive_logging_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ def mask_if_has_mbi(text):
return re.sub(MBI_PATTERN, '***MBI***', str(text), flags=re.VERBOSE)


def is_not_primitive(value):
primitive_types = (int, float, bool, str, bytes)
return not isinstance(value, primitive_types)


def mask_mbi(value_to_mask):
if isinstance(value_to_mask, str):
return mask_if_has_mbi(value_to_mask)
Expand All @@ -40,10 +35,7 @@ def mask_mbi(value_to_mask):

if isinstance(value_to_mask, dict):
for key, value in value_to_mask.items():
if is_not_primitive(value):
value_to_mask[key] = mask_mbi(value)
else:
value_to_mask[key] = mask_if_has_mbi(value)
value_to_mask[key] = mask_mbi(value)

return value_to_mask

Expand Down
1 change: 0 additions & 1 deletion hhs_oauth_server/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@
'django': {
'handlers': ['console'],
'level': 'INFO',
'propagate': True,
},
},
},
Expand Down

0 comments on commit a11834c

Please sign in to comment.