File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,29 @@ def __init__(
101
101
"""
102
102
self .auth_info = auth_info or AuthenticationInformation ()
103
103
self .requester = requester
104
- self .requester_name = requester_name or [
105
- {"text" : requester , "lang" : "en" }
106
- ]
107
- self .subject_id = subject_id or user_id or name_id
108
- self .subject_type = subject_type or user_id_hash_type
104
+ self .requester_name = (
105
+ requester_name
106
+ if requester_name is not None
107
+ else [
108
+ {"text" : requester , "lang" : "en" }
109
+ ]
110
+ )
111
+ self .subject_id = (
112
+ subject_id
113
+ if subject_id is not None
114
+ else user_id
115
+ if user_id is not None
116
+ else name_id
117
+ if name_id is not None
118
+ else None
119
+ )
120
+ self .subject_type = (
121
+ subject_type
122
+ if subject_type is not None
123
+ else user_id_hash_type
124
+ if user_id_hash_type is not None
125
+ else None
126
+ )
109
127
self .attributes = (
110
128
attributes
111
129
if attributes is not None
You can’t perform that action at this time.
0 commit comments