Sep 4, 2018 · 1 min read
I need to disable the Unique validation and i did the following :
class IPCreateSerializer(serializers.ModelSerializer):
name = serializers.CharField()
address = serializers.CharField()
class Meta:
model = IP
fields = ['name', 'address']
extra_kwargs = {
'name': {'validators': [validators.UniqueValidator()]},
'address': {'validators': [validators.UniqueValidator()]},
}However, this gives me an error saying:
TypeError: __init__() missing 1 required positional argument: ‘queryset’
How would i fix that ?