Skip to content

Commit

Permalink
fix object of type 'NoneType' has no len()
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheripov committed Jan 15, 2024
1 parent b85696e commit ae73e01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_google_structured_logger/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def complete_mask(value):
return "...FULL_MASKED..."

def partial_mask(value):
if not value:
return value
length = len(value)
if length <= 4:
return complete_mask(value)
Expand Down

0 comments on commit ae73e01

Please sign in to comment.