Commit b8d22908 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch '793-keycloak-users-with-unexpected-attributes-create-processing-errors' into 'v1.0.7'

Resolve "Keycloak users with unexpected attributes create processing errors."

See merge request !618
parents ef61f7ce fd9f6a27
Pipeline #128268 passed with stages
in 53 minutes
......@@ -308,6 +308,7 @@ class Keycloak():
kwargs = {key: value[0] for key, value in keycloak_user.get('attributes', {}).items()}
oasis_admin = kwargs.pop('is_oasis_admin', None) is not None
return datamodel.User(
......@@ -1292,13 +1292,14 @@ class MSection(metaclass=MObjectMeta): # TODO find a way to make this a subclas
return cast(MSectionBound, sub_section)
def m_update(self, safe: bool = True, **kwargs):
def m_update(self, m_ignore_additional_keys: bool = False, **kwargs):
''' Updates all quantities and sub-sections with the given arguments. '''
self.m_mod_count += 1
if safe:
for name, value in kwargs.items():
prop = self.m_def.all_aliases.get(name, None)
if prop is None:
if m_ignore_additional_keys:
raise KeyError('%s is not an attribute of this section %s' % (name, self))
if isinstance(prop, SubSection):
......@@ -1314,9 +1315,6 @@ class MSection(metaclass=MObjectMeta): # TODO find a way to make this a subclas
self.m_set(prop, value)
def m_as(self, section_cls: Type[MSectionBound]) -> MSectionBound:
''' 'Casts' this section to the given extending sections. '''
return cast(MSectionBound, self)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment