Skip to content

Commit 10d1853

Browse files
authored
Fix key_error on non-existing keys
Fix key_error on non-existing keys.
1 parent 96e56a5 commit 10d1853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/satosa/micro_services/custom_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def process(self, context, data):
7777
log['sessionid'] = context.state.state_dict['SESSION_ID']
7878
log['idp'] = idpEntityID
7979
log['sp'] = spEntityID
80-
log['attr'] = { key: data.to_dict()['attr'][key] for key in attrs }
80+
log['attr'] = { key: data.to_dict()['attr'].get(key) for key in attrs }
8181

8282
print(json.dumps(log), file=loghandle, end="\n")
8383

0 commit comments

Comments
 (0)