authentic agent: do not alter type of attributes (#22437)
This commit is contained in:
parent
3491269db8
commit
93eacef399
|
@ -68,9 +68,11 @@ class Command(hobo_deploy.Command):
|
|||
# so it gets shared as SAML attribute.
|
||||
fields.append(attribute['name'])
|
||||
continue
|
||||
attr, created = Attribute.objects.get_or_create(name=attribute['name'])
|
||||
attr, created = Attribute.objects.get_or_create(
|
||||
name=attribute['name'],
|
||||
defaults={'kind': attribute['kind']})
|
||||
for key in ('label', 'description', 'asked_on_registration',
|
||||
'user_editable', 'user_visible', 'kind', 'required'):
|
||||
'user_editable', 'user_visible', 'required'):
|
||||
setattr(attr, key, attribute[key])
|
||||
if attribute['disabled']:
|
||||
# don't actively remove attribute, just make sure it never
|
||||
|
|
Loading…
Reference in New Issue