diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /app/models/sent_notification.rb | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/models/sent_notification.rb')
-rw-r--r-- | app/models/sent_notification.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/models/sent_notification.rb b/app/models/sent_notification.rb index 5d7b3879d75..8fea0d6d993 100644 --- a/app/models/sent_notification.rb +++ b/app/models/sent_notification.rb @@ -68,7 +68,11 @@ class SentNotification < ApplicationRecord def noteable if for_commit? - project.commit(commit_id) rescue nil + begin + project.commit(commit_id) + rescue StandardError + nil + end else super end @@ -76,7 +80,11 @@ class SentNotification < ApplicationRecord def position=(new_position) if new_position.is_a?(String) - new_position = Gitlab::Json.parse(new_position) rescue nil + new_position = begin + Gitlab::Json.parse(new_position) + rescue StandardError + nil + end end if new_position.is_a?(Hash) |