Django Rest Framework model serializer with out unique together validation

前端 未结 2 748
粉色の甜心
粉色の甜心 2021-01-04 02:01

I have a model with some fields and a unique together:

....
class Meta(object):
    unique_together = (\'device_identifier\', \'device_platform\         


        
2条回答
  •  悲&欢浪女
    2021-01-04 02:47

    You need to remove the validator from the serializer's list.

    Although not exactly the same, the steps are explained here

提交回复
热议问题