Allow to edit inactive blocks

This commit is contained in:
Anton Khorev 2024-07-24 04:22:49 +03:00
parent eb0f95b6ae
commit 51708d6238
3 changed files with 37 additions and 4 deletions

View file

@ -142,9 +142,6 @@ class UserBlocksController < ApplicationController
if UserBlock::PERIODS.exclude?(@block_period)
flash[:error] = t("user_blocks.filter.block_period")
elsif @user_block && !@user_block.active?
flash[:error] = t("user_blocks.filter.block_expired")
else
@valid_params = true
end