Merge branch 'make-rubocop-happy-again' into 'master'

Use safe navigation operator to make rubocop happy

See merge request !9185
This commit is contained in:
Rémy Coutable 2017-02-13 13:24:38 +00:00
commit 54c4e4d706
2 changed files with 2 additions and 2 deletions

View file

@ -126,7 +126,7 @@ class Environment < ActiveRecord::Base
return unless available?
stop!
stop_action.play(current_user) if stop_action
stop_action&.play(current_user)
end
def actions_for(environment)

View file

@ -15,7 +15,7 @@ module Issues
def before_create(issuable)
if @recaptcha_verified
spam_log = current_user.spam_logs.find_by(id: @spam_log_id, title: issuable.title)
spam_log.update!(recaptcha_verified: true) if spam_log
spam_log&.update!(recaptcha_verified: true)
else
issuable.spam = spam_service.check(@api)
issuable.spam_log = spam_service.spam_log