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 17c7431 commit 06fd63dCopy full SHA for 06fd63d
rest_framework/fields.py
@@ -262,7 +262,11 @@ def get_value(self, dictionary):
262
if html.is_html_input(dictionary):
263
# HTML forms will represent empty fields as '', and cannot
264
# represent None or False values directly.
265
- ret = dictionary.get(self.field_name, '')
+ if self.field_name not in dictionary:
266
+ if getattr(self.root, 'partial', False):
267
+ return empty
268
+ return self.default_empty_html
269
+ ret = dictionary[self.field_name]
270
return self.default_empty_html if (ret == '') else ret
271
return dictionary.get(self.field_name, empty)
272
0 commit comments