Skip to content

Commit

Permalink
fix: conditional was never true due to map
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhodgkiss committed Dec 29, 2023
1 parent 84ee860 commit 262a313
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions utils/kayobe-automation-redact
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ annotation_exceptions = {
}

def annotate(ctx, value):
if not isinstance(value, str):
return value
path_str = map(str, ctx['path'])
if path_str in annotation_exceptions:
return f"{'.'.join(annotation_exceptions['prometheus_bcrypt_salt'])}.{value}"
else:
return f"{'.'.join(path_str)}.{ value }"
if not isinstance(value, str):
return value
path_str = ctx['path'][0]
if path_str in annotation_exceptions:
return f"{annotation_exceptions[path_str]}.{value}"
else:
return f"{path_str}.{value}"

def redact_int(ctx, x):
# For numbers we can't indicate change with a string, so use sentinal values
Expand Down

0 comments on commit 262a313

Please sign in to comment.