activity: avoid existing entities being added in Users, ThirdParties, Persons

This commit is contained in:
juminet
2021-11-29 12:27:54 +00:00
committed by Julien Fastré
parent 58119b3de0
commit b300858bdd
18 changed files with 277 additions and 94 deletions

View File

@@ -408,7 +408,7 @@ final class ActivityController extends AbstractController
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
$defaultLocationId = $this->getUser()->getCurrentLocation()->getId();
$defaultLocation = $this->getUser()->getCurrentLocation();
return $this->render($view, [
'person' => $person,
@@ -416,7 +416,7 @@ final class ActivityController extends AbstractController
'entity' => $entity,
'form' => $form->createView(),
'activity_json' => $activity_array,
'default_location_id' => $defaultLocationId,
'default_location' => $defaultLocation,
]);
}