summaryrefslogtreecommitdiff
path: root/app/workers/create_gpg_signature_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/create_gpg_signature_worker.rb')
-rw-r--r--app/workers/create_gpg_signature_worker.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/workers/create_gpg_signature_worker.rb b/app/workers/create_gpg_signature_worker.rb
index f34dff2d656..9b5ff17aafa 100644
--- a/app/workers/create_gpg_signature_worker.rb
+++ b/app/workers/create_gpg_signature_worker.rb
@@ -6,7 +6,11 @@ class CreateGpgSignatureWorker
project = Project.find_by(id: project_id)
return unless project
+ commit = project.commit(commit_sha)
+
+ return unless commit
+
# This calculates and caches the signature in the database
- Gitlab::Gpg::Commit.new(project, commit_sha).signature
+ Gitlab::Gpg::Commit.new(commit).signature
end
end