We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 327ad8c commit 8c9bb73Copy full SHA for 8c9bb73
netbox/netbox/api/serializers/base.py
@@ -76,6 +76,12 @@ class ValidatedModelSerializer(BaseModelSerializer):
76
Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during
77
validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
78
"""
79
+
80
+ # Bypass DRF's built-in validation of unique constraints due to DRF bug #9410. Rely instead
81
+ # on our own custom model validation (below).
82
+ def get_unique_together_constraints(self, model):
83
+ return []
84
85
def validate(self, data):
86
87
# Skip validation if we're being used to represent a nested object
0 commit comments