Skip to content

Commit

Permalink
lint: Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Jan 7, 2025
1 parent e5bdaa1 commit 1eff300
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions app/jobs/clear_duplicated_half_signup_users_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ def clear_data(users, clear_user_accounts)
users.each do |user|
if user.email.include?("quick_auth")
soft_delete_user(user, "HalfSignup duplicated account")
elsif clear_user_accounts
clear_account_phone_number(user)
else
if clear_user_accounts
clear_account_phone_number(user)
else
decidim_user_dup_accounts << user
end
decidim_user_dup_accounts << user
end
end

Expand Down Expand Up @@ -97,7 +95,6 @@ def clear_account_phone_number(user)
user.save(validate: false)
end


log! "User (ID/#{user.id} email/#{user.email}) has been cleaned"
end

Expand Down
4 changes: 2 additions & 2 deletions app/jobs/concerns/decidim/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def log!(msg, level = :warn)
case level
when :info
Rails.logger.info msg
stdout_logger.info msg unless Rails.env.production?
stdout_logger.info msg
else
Rails.logger.warn msg
stdout_logger.warn msg unless Rails.env.production?
stdout_logger.warn msg
end
end

Expand Down

0 comments on commit 1eff300

Please sign in to comment.