瀏覽代碼

Fix: Should pop pins_to_add instead of pins_to_remove

pull/180/head
winkidney 4 年之前
父節點
當前提交
acc8293374
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      core/serializers.py

+ 1
- 1
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(


Loading…
取消
儲存