Commit 81eae63b authored by winniehell's avatar winniehell

Use safe navigation operator to make rubocop happy

parent 2cb70671
......@@ -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