Skip to content
Snippets Groups Projects
Unverified Commit 0e6d7937 authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch Committed by Mateu Aguiló Bosch
Browse files

Issue #2933160 by e0ipso: Translate the related route parameter to the internal field name

parent 0a56ad4c
No related branches found
Tags 8.x-1.6
No related merge requests found
......@@ -116,11 +116,13 @@ class RequestHandler implements ContainerAwareInterface, ContainerInjectionInter
return NULL;
}
$format = $request->getContentType();
$resource_type = $current_context->getResourceType();
$field_related = $resource_type->getInternalName($request->get('related'));
try {
return $serializer->deserialize($received, $serialization_class, $format, [
'related' => $request->get('related'),
'related' => $field_related,
'target_entity' => $request->get($current_context->getResourceType()->getEntityTypeId()),
'resource_type' => $current_context->getResourceType(),
'resource_type' => $resource_type,
]);
}
catch (UnexpectedValueException $e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment