From e31024e728430f6c92b2a69ffcbf5998f2254c9b Mon Sep 17 00:00:00 2001 From: Yurii Date: Tue, 14 Apr 2026 11:53:51 +0300 Subject: [PATCH] Fix note pin --- application/Espo/Tools/Stream/Api/PostNotePin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/Espo/Tools/Stream/Api/PostNotePin.php b/application/Espo/Tools/Stream/Api/PostNotePin.php index 8044506c5f..a17fb1cc00 100644 --- a/application/Espo/Tools/Stream/Api/PostNotePin.php +++ b/application/Espo/Tools/Stream/Api/PostNotePin.php @@ -72,6 +72,9 @@ class PostNotePin implements Action $this->checkParent($note); $this->checkPinnedCount($note); + $note->setIsPinned(true); + $this->entityManager->saveEntity($note); + return ResponseComposer::json(true); } @@ -91,9 +94,6 @@ class PostNotePin implements Action throw new Forbidden("No read access."); } - $note->setIsPinned(true); - $this->entityManager->saveEntity($note); - return $note; }