From: Tom Hughes Date: Wed, 21 Aug 2024 18:04:06 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/5069' X-Git-Tag: live~295 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/754a0a9cb5c49114181fd1d1181eea0d757dbac4 Merge remote-tracking branch 'upstream/pull/5069' --- 754a0a9cb5c49114181fd1d1181eea0d757dbac4 diff --cc app/controllers/user_blocks_controller.rb index ae6e3c1cd,73c6ccd69..71a0b4c31 --- a/app/controllers/user_blocks_controller.rb +++ b/app/controllers/user_blocks_controller.rb @@@ -72,7 -74,7 +74,8 @@@ class UserBlocksController < Applicatio @user_block.reason = params[:user_block][:reason] @user_block.needs_view = params[:user_block][:needs_view] @user_block.ends_at = Time.now.utc + @block_period.hours + @user_block.deactivates_at = (@user_block.ends_at unless @user_block.needs_view) + @user_block.revoker = current_user if user_block_was_active && !@user_block.active? if !user_block_was_active && @user_block.active? flash.now[:error] = t(".inactive_block_cannot_be_reactivated") render :action => "edit"