providers/scim: default to None for fields instead of empty list (#5642)
* providers/scim: default to None for fields instead of empty list Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make name of delete_none_keys clearer Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -21,7 +21,7 @@ entries:
|
||||
|
||||
# photos supports URLs to images, however authentik might return data URIs
|
||||
avatar = request.user.avatar
|
||||
photos = []
|
||||
photos = None
|
||||
if "://" in avatar:
|
||||
photos = [{"value": avatar, "type": "photo"}]
|
||||
|
||||
@ -31,11 +31,11 @@ entries:
|
||||
|
||||
emails = []
|
||||
if request.user.email != "":
|
||||
emails.append({
|
||||
emails = [{
|
||||
"value": request.user.email,
|
||||
"type": "other",
|
||||
"primary": True,
|
||||
})
|
||||
}]
|
||||
return {
|
||||
"userName": request.user.username,
|
||||
"name": {
|
||||
|
Reference in New Issue
Block a user