Fix #4603: Total Upload Limit Being Reduced After A Failed Appeal

This commit is contained in:
evazion
2021-06-28 06:04:14 -05:00
parent 000653d840
commit 4b6e706e5e
5 changed files with 51 additions and 11 deletions

View File

@@ -1003,7 +1003,7 @@ class Post < ApplicationRecord
# XXX This must happen *after* the `is_deleted` flag is set to true (issue #3419).
give_favorites_to_parent if move_favorites
uploader.upload_limit.update_limit!(self, incremental: automated)
uploader.upload_limit.update_limit!(is_pending?, false)
unless automated
ModAction.log("deleted post ##{id}, reason: #{reason}", :post_delete)