Projet

Général

Profil

0001-api-do-not-set-allow_blank-True-on-all-attribute-fie.patch

Benjamin Dauvergne, 24 mars 2017 15:45

Télécharger (1,02 ko)

Voir les différences:

Subject: [PATCH] api: do not set allow_blank=True on all attribute fields
 (fixes #15621)

 src/authentic2/api_views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/authentic2/api_views.py
283 283
            kind = attribute_kinds.get_kind(at.kind)
284 284
            field_class = kind['rest_framework_field_class']
285 285
            self.fields[at.name] = field_class(source='attributes.%s' % at.name,
286
                                               required=at.required, allow_blank=True)
286
                                               required=at.required)
287 287

  
288 288
    def check_perm(self, perm, ou):
289 289
        self.context['view'].check_perm(perm, ou)
290
-