Commit 54c4e4d7 authored by Rémy Coutable's avatar Rémy Coutable

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

Use safe navigation operator to make rubocop happy

See merge request !9185
parents 42ad07c6 81eae63b
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment