summaryrefslogtreecommitdiff
path: root/app/models/gpg_key.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-08-24 16:52:06 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-09-05 12:18:32 +0200
commit3b090bb9a9d857f8db1a8b16a48d39afdb02a21b (patch)
tree8bfcbb1a6038cabbe56846b55304b3c4e8145987 /app/models/gpg_key.rb
parentd6c58a51e5e79071157caa801bda94b2506131d4 (diff)
downloadgitlab-ce-3b090bb9a9d857f8db1a8b16a48d39afdb02a21b.tar.gz
simplify check for verified email in collection
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r--app/models/gpg_key.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb
index cb46ff8145d..9b3723fa4d7 100644
--- a/app/models/gpg_key.rb
+++ b/app/models/gpg_key.rb
@@ -70,11 +70,11 @@ class GpgKey < ActiveRecord::Base
end
def verified?
- emails_with_verified_status.any? { |_email, verified| verified }
+ emails_with_verified_status.values.any?
end
def verified_and_belongs_to_email?(email)
- emails_with_verified_status.any? { |key_email, verified| key_email == email && verified }
+ emails_with_verified_status.fetch(email, false)
end
def update_invalid_gpg_signatures