]> cat aescling's git repositories - mastodon.git/commitdiff
Allow editing media attachments for scheduled toots (#17690)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 3 Mar 2022 15:13:58 +0000 (16:13 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Mar 2022 15:13:58 +0000 (16:13 +0100)
Fixes #17676

app/controllers/api/v1/media_controller.rb

index 72094790fdecf3e86cf1b6cf924f02b063482685..f9c935bf3e1ec4dc7b608ccb6b49feb0396a4ecd 100644 (file)
@@ -31,7 +31,7 @@ class Api::V1::MediaController < Api::BaseController
   end
 
   def set_media_attachment
-    @media_attachment = current_account.media_attachments.unattached.find(params[:id])
+    @media_attachment = current_account.media_attachments.where(status_id: nil).find(params[:id])
   end
 
   def check_processing