From 39dc2b128732eafa5844d168f2fa2bdea7ac5159 Mon Sep 17 00:00:00 2001 From: 2458773093 <2458773093@protonmail.com> Date: Fri, 23 Aug 2019 03:53:02 +0300 Subject: [PATCH] allow existing images of the account for edits --- app/services/edit_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/edit_status_service.rb b/app/services/edit_status_service.rb index 013cd513..f90f0312 100644 --- a/app/services/edit_status_service.rb +++ b/app/services/edit_status_service.rb @@ -65,7 +65,7 @@ class EditStatusService < BaseService raise GabSocial::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > 4 - @media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i)) + @media = @account.media_attachments.where(id: @options[:media_ids].take(4).map(&:to_i)) raise GabSocial::ValidationError, I18n.t('media_attachments.validations.images_and_video') if @media.size > 1 && @media.find(&:video?) end