Fix lint errors
This commit is contained in:
parent
1216c249e8
commit
72906ca549
|
@ -12,10 +12,10 @@ class QuestionWorker
|
|||
question = Question.find(question_id)
|
||||
|
||||
user.followers.each do |f|
|
||||
if MuteRule.where(user: f).none? { |rule| rule.applies_to? question }
|
||||
next if MuteRule.where(user: f).any? { |rule| rule.applies_to? question }
|
||||
|
||||
Inbox.create(user_id: f.id, question_id: question_id, new: true)
|
||||
end
|
||||
end
|
||||
rescue StandardError => e
|
||||
logger.info "failed to ask question: #{e.message}"
|
||||
Sentry.capture_exception(e)
|
||||
|
|
|
@ -48,11 +48,11 @@ module UseCase
|
|||
end
|
||||
|
||||
def check_blocks
|
||||
if source_user_id.present?
|
||||
return if source_user_id.blank?
|
||||
|
||||
raise Errors::AskingOtherBlockedSelf if target_user.blocking?(source_user)
|
||||
raise Errors::AskingSelfBlockedOther if source_user.blocking?(target_user)
|
||||
end
|
||||
end
|
||||
|
||||
def increment_asked_count
|
||||
unless source_user_id && !anonymous
|
||||
|
|
Loading…
Reference in New Issue