提交 54c4e4d7 编写于 作者: R Rémy Coutable

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

Use safe navigation operator to make rubocop happy

See merge request !9185
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册