Revert "FIX: Post uploads setting access_control_post_id unnecessarily (#26627)" (#26643)

This reverts commit cdc8e9de1b.

It's made things worse internally and on meta.
This commit is contained in:
Martin Brennan
2024-04-16 14:10:25 +10:00
committed by GitHub
parent cdc8e9de1b
commit 7a083daf27
5 changed files with 22 additions and 73 deletions

View File

@@ -6,10 +6,6 @@ class UploadReference < ActiveRecord::Base
delegate :to_markdown, to: :upload
def target?(target_to_check)
self.target_id == target_to_check.id && self.target_type == target_to_check.class.to_s
end
def self.ensure_exist!(upload_ids: [], target: nil, target_type: nil, target_id: nil)
if !target && !(target_type && target_id)
raise "target OR target_type and target_id are required"