mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Remove run_validators() override (fixed upstream)
This commit is contained in:
parent
6034265dfd
commit
bf2f314cd4
@ -202,13 +202,6 @@ class WritableNestedSerializer(ModelSerializer):
|
|||||||
"""
|
"""
|
||||||
Returns a nested representation of an object on read, but accepts only a primary key on write.
|
Returns a nested representation of an object on read, but accepts only a primary key on write.
|
||||||
"""
|
"""
|
||||||
def run_validators(self, value):
|
|
||||||
# DRF v3.8.2: Skip running validators on the data, since we only accept an integer PK instead of a dict. For
|
|
||||||
# more context, see:
|
|
||||||
# https://github.com/encode/django-rest-framework/pull/5922/commits/2227bc47f8b287b66775948ffb60b2d9378ac84f
|
|
||||||
# https://github.com/encode/django-rest-framework/issues/6053
|
|
||||||
return
|
|
||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
if data is None:
|
if data is None:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user