diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-16 22:29:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 22:29:48 +0100 |
commit | ac99f586bb4138e083676579097d951434e90515 (patch) | |
tree | 2ab02a0a811e96052eb0fc41875f1e8d2709f035 /app/policies | |
parent | aa86cf955755cd05ed9c274daebbec248c39d863 (diff) |
Fix issues when attempting to appeal an old strike (#17554)
* Display an error when an appeal could not be submitted * Do not offer users to appeal old strikes * Fix 500 error when trying to appeal a strike that is too old * Avoid using an extra translatable string
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/account_warning_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/account_warning_policy.rb b/app/policies/account_warning_policy.rb index 6b92da475..65707dfa7 100644 --- a/app/policies/account_warning_policy.rb +++ b/app/policies/account_warning_policy.rb @@ -6,7 +6,7 @@ class AccountWarningPolicy < ApplicationPolicy end def appeal? - target? + target? && record.created_at >= Appeal::MAX_STRIKE_AGE.ago end private |