file upload fix
This commit is contained in:
1 parent
16a3b54942
commit
f00fe8a348
10 files changed
+1085
-438
No files matched your search
@@ -128,15 +128,15 @@ namespace :universal_table_tasks do
|
||||
site_locales.each_with_index do |locale, locale_idx|
|
||||
file_titles[locale.to_s] = row[col_idx + locale_idx + 1]&.value.to_s.split(";").map(&:strip)
|
||||
end
|
||||
ce.column_entry_files.destroy_all
|
||||
ce.column_entry_files = []
|
||||
# ce.column_entry_files.destroy_all
|
||||
# ce.column_entry_files = []
|
||||
cef_ids = ce.column_entry_files.pluck(:id)
|
||||
|
||||
file_urls.each_with_index do |remote_url, file_idx|
|
||||
if remote_url.blank?
|
||||
skip = site_locales.size
|
||||
end
|
||||
next if remote_url.blank?
|
||||
debugger
|
||||
file = ColumnEntryFile.new
|
||||
file.remote_file_url = remote_url
|
||||
titles = {}
|
||||
@@ -147,6 +147,7 @@ namespace :universal_table_tasks do
|
||||
file.save!
|
||||
ce.column_entry_files << file
|
||||
end
|
||||
ColumnEntryFile.where(:id.in => cef_ids).destroy_all
|
||||
|
||||
when "date"
|
||||
ce.date = val
|
||||
|
||||
Reference in new issue
Block a user