mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-04 15:01:48 +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
|
|
@ -353,6 +353,10 @@ class Todo < ApplicationRecord
|
|||
|
||||
def self.import(filename, params, user)
|
||||
default_context = user.contexts.order('id').first
|
||||
if default_context.nil?
|
||||
logger.error "No available contexts in import"
|
||||
return FALSE
|
||||
end
|
||||
|
||||
count = 0
|
||||
CSV.foreach(filename, headers: true) do |row|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue