allow existing images of the account for edits

This commit is contained in:
2458773093 2019-08-23 03:53:02 +03:00
parent 29d5656fb2
commit 39dc2b1287
1 changed files with 1 additions and 1 deletions

View File

@ -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