Projet

Général

Profil

0001-profile-never-include-disabled-fields-in-settings-16.patch

Frédéric Péters, 27 avril 2017 16:34

Télécharger (1,2 ko)

Voir les différences:

Subject: [PATCH] profile: never include disabled fields in settings (#16066)

 hobo/multitenant/settings_loaders.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hobo/multitenant/settings_loaders.py
211 211
        fields = hobo_json.get('profile', {}).get('fields')
212 212
        if fields:
213 213
            fields.sort(lambda x, y: cmp(x.get('order'), y.get('order')))
214
            tenant_settings.A2_PROFILE_FIELDS = [
215
                    x['name'] for x in fields if not x['disabled']]
214
            fields = [x for x in fields if not x['disabled']]
215
            tenant_settings.A2_PROFILE_FIELDS = [x['name'] for x in fields]
216 216
            tenant_settings.A2_REQUIRED_FIELDS = [
217 217
                    x['name'] for x in fields if x['required']]
218 218
            tenant_settings.A2_REGISTRATION_FIELDS = [
219
-