FIX add initial user as suggestion and fix error when there are no suggestions

This commit is contained in:
2023-03-15 10:14:25 +01:00
parent de4cb1585b
commit eaea702454
4 changed files with 4 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ class PickThirdpartyDynamicType extends AbstractType
$view->vars['multiple'] = $options['multiple'];
$view->vars['types'] = ['thirdparty'];
$view->vars['uniqid'] = uniqid('pick_user_dyn');
$view->vars['suggested'] = [];
foreach ($options['suggested'] as $tp) {
$view->vars['suggested'][] = $this->normalizer->normalize($tp, 'json', ['groups' => 'read']);