diff --git a/rest_framework/generics.py b/rest_framework/generics.py index 14feed204..4d909ef1c 100644 --- a/rest_framework/generics.py +++ b/rest_framework/generics.py @@ -356,8 +356,13 @@ class GenericAPIView(views.APIView): self.check_permissions(cloned_request) # Test object permissions if method == 'PUT': - self.get_object() - except (exceptions.APIException, PermissionDenied, Http404): + try: + self.get_object() + except Http404: + # Http404 should be acceptable and the serializer + # metadata should be populated. + pass + except (exceptions.APIException, PermissionDenied): pass else: # If user has appropriate permissions for the view, include