Fix #4603: Total Upload Limit Being Reduced After A Failed Appeal
This commit is contained in:
@@ -26,6 +26,7 @@ class PostApproval < ApplicationRecord
|
||||
end
|
||||
|
||||
def approve_post
|
||||
is_pending = post.is_pending
|
||||
is_undeletion = post.is_deleted
|
||||
|
||||
post.flags.pending.update!(status: :rejected)
|
||||
@@ -34,7 +35,7 @@ class PostApproval < ApplicationRecord
|
||||
post.update(approver: user, is_flagged: false, is_pending: false, is_deleted: false)
|
||||
ModAction.log("undeleted post ##{post_id}", :post_undelete) if is_undeletion
|
||||
|
||||
post.uploader.upload_limit.update_limit!(post, incremental: !is_undeletion)
|
||||
post.uploader.upload_limit.update_limit!(is_pending, true)
|
||||
end
|
||||
|
||||
def self.search(params)
|
||||
|
||||
Reference in New Issue
Block a user