Fix lint errors

This commit is contained in:
Karina Kwiatek 2022-01-24 22:46:11 +01:00 committed by Karina Kwiatek
parent 1216c249e8
commit 72906ca549
4 changed files with 14 additions and 14 deletions

View File

@ -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)

View File

@ -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