convert if to return unless

This commit is contained in:
Maciej Szlosarczyk 2020-06-26 14:45:44 +03:00
parent 8b7f4b2558
commit fa016aa761
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765

View file

@ -53,7 +53,8 @@ module Actions
end
def maybe_update_ident
if ident[:ident]
return unless ident[:ident]
if contact.identifier.valid?
submitted_ident = ::Contact::Ident.new(code: ident[:ident],
type: ident[:ident_type],
@ -81,7 +82,6 @@ module Actions
contact.ident_updated_at ||= Time.zone.now
end
end
end
def commit
return false if @error