Skip to content
Snippets Groups Projects
Commit 01a13858 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Merge branch 'fix-mp4' into 'master'

Fix mp4

See merge request !452
parents e81a5b3b 9bacb0b3
No related branches found
No related tags found
No related merge requests found
...@@ -120,6 +120,10 @@ class LearningObject < ApplicationRecord ...@@ -120,6 +120,10 @@ class LearningObject < ApplicationRecord
return attachment unless attachment.nil? return attachment unless attachment.nil?
unless attachments.blank? unless attachments.blank?
if object_type.try(:name) == 'Vídeo'
at = attachments.where("name LIKE '%.mp4'").first
return at unless at.nil?
end
at = attachments.find_by(bundle_name: 'ORIGINAL') at = attachments.find_by(bundle_name: 'ORIGINAL')
at = attachments.first if at.nil? at = attachments.first if at.nil?
update(attachment: at) update(attachment: at)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment