From 7ab9513e055111aff68121ede0a27bb1c42c5d3c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 2 Sep 2020 11:11:17 +0300 Subject: [PATCH] Serializers: rename message to detail to conform with the rest of the API. This was a mistake in the previous commit. --- django_etebase/serializers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/django_etebase/serializers.py b/django_etebase/serializers.py index 356da82..036da1e 100644 --- a/django_etebase/serializers.py +++ b/django_etebase/serializers.py @@ -137,7 +137,7 @@ class BetterErrorsMixin: ) if nice: return {'code': 'field_errors', - 'message': 'Field validations failed.', + 'detail': 'Field validations failed.', 'errors': nice} return {} @@ -158,7 +158,7 @@ class BetterErrorsMixin: ret.append({ 'field': field_name, 'code': error.code, - 'message': message, + 'detail': message, }) return ret @@ -172,7 +172,7 @@ class BetterErrorsMixin: raise serializers.ValidationError({ 'code': 'field_errors', - 'message': 'Field validations failed.', + 'detail': 'Field validations failed.', 'errors': errors, })