Skip to content

Commit 262a313

Browse files
committed
fix: conditional was never true due to map
1 parent 84ee860 commit 262a313

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

utils/kayobe-automation-redact

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ annotation_exceptions = {
1010
}
1111

1212
def annotate(ctx, value):
13-
if not isinstance(value, str):
14-
return value
15-
path_str = map(str, ctx['path'])
16-
if path_str in annotation_exceptions:
17-
return f"{'.'.join(annotation_exceptions['prometheus_bcrypt_salt'])}.{value}"
18-
else:
19-
return f"{'.'.join(path_str)}.{ value }"
13+
if not isinstance(value, str):
14+
return value
15+
path_str = ctx['path'][0]
16+
if path_str in annotation_exceptions:
17+
return f"{annotation_exceptions[path_str]}.{value}"
18+
else:
19+
return f"{path_str}.{value}"
2020

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

0 commit comments

Comments
 (0)