diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/background_migration/create_gpg_key_subkeys_from_gpg_keys.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/create_gpg_key_subkeys_from_gpg_keys.rb b/lib/gitlab/background_migration/create_gpg_key_subkeys_from_gpg_keys.rb index 3a32134b991..e94719db72e 100644 --- a/lib/gitlab/background_migration/create_gpg_key_subkeys_from_gpg_keys.rb +++ b/lib/gitlab/background_migration/create_gpg_key_subkeys_from_gpg_keys.rb @@ -26,7 +26,8 @@ class Gitlab::BackgroundMigration::CreateGpgKeySubkeysFromGpgKeys return if gpg_key.nil? return if gpg_key.subkeys.any? - create_subkeys(gpg_key) && update_signatures(gpg_key) + create_subkeys(gpg_key) + update_signatures(gpg_key) end private @@ -45,6 +46,8 @@ class Gitlab::BackgroundMigration::CreateGpgKeySubkeysFromGpgKeys end def update_signatures(gpg_key) + return unless gpg_key.subkeys.exists? + InvalidGpgSignatureUpdateWorker.perform_async(gpg_key.id) end end |