Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gab
social
gab-social
Commits
39dc2b12
Commit
39dc2b12
authored
Aug 23, 2019
by
2458773093
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow existing images of the account for edits
parent
29d5656f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
app/services/edit_status_service.rb
app/services/edit_status_service.rb
+1
-1
No files found.
app/services/edit_status_service.rb
View file @
39dc2b12
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment