Projet

Général

Profil

0002-auth_fc-ignore-non-user_editable-attributes-when-che.patch

Benjamin Dauvergne, 26 juillet 2021 16:54

Télécharger (1,15 ko)

Voir les différences:

Subject: [PATCH 2/3] auth_fc: ignore non user_editable attributes when
 checking missing required attributes (#55836)

 src/authentic2_auth_fc/views.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
src/authentic2_auth_fc/views.py
359 359

  
360 360
    def missing_required_attributes(self, user):
361 361
        '''Compute if user has not filled some required attributes.'''
362
        name_to_label = dict(a2_models.Attribute.objects.filter(required=True).values_list('name', 'label'))
362
        name_to_label = dict(
363
            a2_models.Attribute.objects.filter(required=True, user_editable=True).values_list('name', 'label')
364
        )
363 365
        required = list(a2_app_settings.A2_REGISTRATION_REQUIRED_FIELDS) + list(name_to_label)
364 366
        missing = []
365 367
        for attr_name in set(required):
366
-