mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
handle case when user is null in comment embeddable
This commit is contained in:
parent
c5ffca22ff
commit
99dc9dd4a8
@ -52,7 +52,11 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa
|
||||
];
|
||||
}
|
||||
|
||||
$user = $this->userRepository->find($object->getUserId());
|
||||
if (null === $object->getUserId()) {
|
||||
$user = null;
|
||||
} else {
|
||||
$user = $this->userRepository->find($object->getUserId());
|
||||
}
|
||||
|
||||
return [
|
||||
'comment' => $object->getComment(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user