From acc8293374b0ca2780cca385b40746c5af738910 Mon Sep 17 00:00:00 2001 From: winkidney Date: Tue, 11 Feb 2020 12:23:31 +0800 Subject: [PATCH] Fix: Should pop pins_to_add instead of pins_to_remove --- core/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/serializers.py b/core/serializers.py index 674d462..6cef857 100644 --- a/core/serializers.py +++ b/core/serializers.py @@ -217,7 +217,7 @@ class BoardSerializer(serializers.HyperlinkedModelSerializer): def create(self, validated_data): validated_data.pop('pins_to_remove', None) - validated_data.pop('pins_to_remove', None) + validated_data.pop('pins_to_add', None) user = self.context['request'].user if Board.objects.filter(name=validated_data['name'], submitter=user).exists(): raise ValidationError(