fix(piece_justicative): don't modify validator accepted formats in place
Previous implementation caused to add multiple times ".acidcsa".
This commit is contained in:
parent
3e992589c5
commit
84ca01bdf7
1 changed files with 2 additions and 4 deletions
|
@ -110,10 +110,8 @@ class Attachment::EditComponent < ApplicationComponent
|
|||
end
|
||||
|
||||
def accept_content_type
|
||||
list = content_type_validator.options[:in]
|
||||
if list.include?("application/octet-stream")
|
||||
list.push(".acidcsa")
|
||||
end
|
||||
list = content_type_validator.options[:in].dup
|
||||
list << ".acidcsa" if list.include?("application/octet-stream")
|
||||
list.join(', ')
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue