mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 00:08:50 +01:00
Error message fixes for CSV import. Add the necessary directory to Docker image.
This commit is contained in:
parent
194d261042
commit
c2bd1b0d81
4 changed files with 26 additions and 3 deletions
|
|
@ -62,12 +62,16 @@ class DataController < ApplicationController
|
|||
flash[:notice] = t 'data.import.projects_count', count: count
|
||||
when 'todos'
|
||||
count = Todo.import path_and_file, params, current_user
|
||||
flash[:notice] = t 'data.import.todos.count', count: count
|
||||
if not count
|
||||
flash[:error] = t('data.import.errors.invalid_destination')
|
||||
else
|
||||
flash[:notice] = t 'data.import.todos_count', count: count
|
||||
end
|
||||
else
|
||||
flash[:error] = t('data.import.errors.invalid_destination')
|
||||
end
|
||||
rescue Exception => e
|
||||
flash[:error] = t 'data.import.invalid_destination', e: e
|
||||
flash[:error] = t 'data.import.errors.invalid_destination', e: e
|
||||
end
|
||||
File.delete(path_and_file)
|
||||
redirect_to import_data_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue