Skip to content

Commit 74cb88c

Browse files
Merge pull request #162 from mrvanes/patch-2
Fix key_error on non-existing keys
2 parents 96e56a5 + 10d1853 commit 74cb88c

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)