summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2017-10-07 10:47:53 -0500
committerRubén Dávila <ruben@gitlab.com>2017-10-07 10:47:53 -0500
commit4aa2deb4782f1f3b516bfaecdb57203765bbb123 (patch)
treed7d5ba0b72c5764debfd900ab6b5f4c0d2805ca8 /app
parent2ef28db9a1b7d56c5dda6230dcffcf4e140ecc45 (diff)
downloadgitlab-ce-4aa2deb4782f1f3b516bfaecdb57203765bbb123.tar.gz
Fix error with GPG signature updater when commit was deleted38890-fix-gpg-signature-updater-when-commit-is-missing
Diffstat (limited to 'app')
-rw-r--r--app/models/gpg_signature.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/gpg_signature.rb b/app/models/gpg_signature.rb
index 675e7a2456d..bf88d75246f 100644
--- a/app/models/gpg_signature.rb
+++ b/app/models/gpg_signature.rb
@@ -60,6 +60,8 @@ class GpgSignature < ActiveRecord::Base
end
def gpg_commit
+ return unless commit
+
Gitlab::Gpg::Commit.new(commit)
end
end