should query the correct collection on perform
This commit is contained in:
parent
b33aa9a0fb
commit
9da7272e59
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ class Retraction
|
|||
|
||||
def perform receiving_user_id
|
||||
Rails.logger.debug "Performing retraction for #{post_id}"
|
||||
if Post.find_by_id(post_id)
|
||||
if self.type.constantize.find_by_id(post_id)
|
||||
unless Post.first(:diaspora_handle => person.diaspora_handle, :id => post_id)
|
||||
raise "#{person.inspect} is trying to retract a post they do not own"
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue