mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +03:00
Fixed regression caused by merge.
This commit is contained in:
parent
707f363bae
commit
848c3740f2
|
@ -990,7 +990,7 @@ class ModelSerializer(Serializer):
|
|||
try:
|
||||
attr_instance = getattr(instance, keys[0])
|
||||
related_models_to_save[key] = attr_instance
|
||||
except AttributeError:
|
||||
except (AttributeError, ObjectDoesNotExist):
|
||||
self._errors[key] = self.error_messages['missing']
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user