From 2bb11a4f95bc098a2d1bf7b0c5f36ec8972d5757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 10 Aug 2018 14:25:03 +0200 Subject: [PATCH] api: expose boolean user attributes as booleans (#25632) --- src/authentic2/attribute_kinds.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/authentic2/attribute_kinds.py b/src/authentic2/attribute_kinds.py index b3ac4f7e..27ae00b4 100644 --- a/src/authentic2/attribute_kinds.py +++ b/src/authentic2/attribute_kinds.py @@ -118,6 +118,7 @@ DEFAULT_ATTRIBUTE_KINDS = [ 'field_class': forms.BooleanField, 'serialize': lambda x: str(int(bool(x))), 'deserialize': lambda x: bool(int(x)), + 'rest_framework_field_class': serializers.NullBooleanField, }, { 'label': _('date'), -- 2.18.0