From 835d10c8c5b431225eb13a253d56108659030ac1 Mon Sep 17 00:00:00 2001 From: David Phan Date: Fri, 13 Jul 2018 14:59:42 +0100 Subject: [PATCH] Explicit '__all__' for `MultiFactorAuthSerializer` Since django-rest-framework 3.3.0 ```AssertionError: ("Creating a ModelSerializer without either the 'fields' attribute or the 'exclude' attribute has been deprecated since 3.3.0, and is now disallowed. Add an explicit fields = 'all' to the MultiFactorAuthSerializer serializer.",)``` This explicit changes would remove this error. --- deux/serializers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deux/serializers.py b/deux/serializers.py index d6905d4..4c39acd 100644 --- a/deux/serializers.py +++ b/deux/serializers.py @@ -39,6 +39,7 @@ def to_representation(self, mfa_instance): class Meta: model = mfa_settings.MFA_MODEL + fields = '__all__' class _BaseChallengeRequestSerializer(MultiFactorAuthSerializer):