Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/sent_notification.rb')
-rw-r--r--app/models/sent_notification.rb12
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)