MCPcopy
hub / github.com/encode/django-rest-framework / validate_empty_values

Method validate_empty_values

rest_framework/fields.py:1038–1041  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

1036 self.rounding = rounding
1037
1038 def validate_empty_values(self, data):
1039 if smart_str(data).strip() == '' and self.allow_null:
1040 return (True, None)
1041 return super().validate_empty_values(data)
1042
1043 def to_internal_value(self, data):
1044 """

Callers

nothing calls this directly

Calls 1

validate_empty_valuesMethod · 0.45

Tested by

no test coverage detected