mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Housekeeping for CleanUpUploads job (#24361)
Followup to 9db8f00b3d, we
don't need this dead code any more. Also made some minor
improvements and comments.
This commit is contained in:
@@ -7,7 +7,7 @@ class ReviewableQueuedPost < Reviewable
|
||||
end
|
||||
|
||||
after_save do
|
||||
if saved_change_to_payload? && self.status == Reviewable.statuses[:pending] &&
|
||||
if saved_change_to_payload? && self.status.to_sym == :pending &&
|
||||
self.payload&.[]("raw").present?
|
||||
upload_ids = Upload.extract_upload_ids(self.payload["raw"])
|
||||
UploadReference.ensure_exist!(upload_ids: upload_ids, target: self)
|
||||
|
||||
Reference in New Issue
Block a user