diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-10-04 18:34:50 +0300 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2017-10-05 16:26:02 +0300 |
commit | 2577cc99818bd0332aa78018de666579971341c8 (patch) | |
tree | fc1b4e38a6b63ca696cc966255d6fba7b7dfc9a9 /app/models/gpg_signature.rb | |
parent | 8be06f20fc64b027911ad75e05afaf0697444d6a (diff) |
Address some feedback from last code review
Diffstat (limited to 'app/models/gpg_signature.rb')
-rw-r--r-- | app/models/gpg_signature.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/gpg_signature.rb b/app/models/gpg_signature.rb index d3cca19cea8..e783c3b24e4 100644 --- a/app/models/gpg_signature.rb +++ b/app/models/gpg_signature.rb @@ -23,8 +23,13 @@ class GpgSignature < ActiveRecord::Base def gpg_key=(model) case model - when GpgKey then super - when GpgKeySubkey then self.gpg_key_subkey = model + when GpgKey + super + when GpgKeySubkey + self.gpg_key_subkey = model + when NilClass + super + self.gpg_key_subkey = nil end end |