diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/organisation.rb | 2 | ||||
| -rw-r--r-- | app/services/zip_service.rb | 4 | ||||
| -rw-r--r-- | app/workers/workbench_import_worker.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 0dab1fc16..4343c87af 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -72,7 +72,7 @@ class Organisation < ActiveRecord::Base end def lines_set - STIF::CodifLineId.lines_set_from_functional_scope( functional_scope ) + STIF::CodifligneLineId.lines_set_from_functional_scope( functional_scope ) end end diff --git a/app/services/zip_service.rb b/app/services/zip_service.rb index 6596f6961..a34dd97cc 100644 --- a/app/services/zip_service.rb +++ b/app/services/zip_service.rb @@ -39,8 +39,8 @@ class ZipService end def add_to_current_output entry - return if is_spurious! entry.name - return if is_foreign_line! entry.name + return if is_spurious!(entry.name) || is_foreign_line!(entry.name) + current_output.put_next_entry entry.name write_to_current_output entry.get_input_stream end diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb index 6a3eda2f9..35a9eff0b 100644 --- a/app/workers/workbench_import_worker.rb +++ b/app/workers/workbench_import_worker.rb @@ -55,7 +55,7 @@ class WorkbenchImportWorker def upload_entry_group_stream eg_name, eg_stream FileUtils.mkdir_p(Rails.root.join('tmp', 'imports')) - File.new(Rails.root.join('tmp', 'imports', "WorkbenchImport_#{eg_name}_#{$$}.zip"), 'wb').tap do |file| + File.open(Rails.root.join('tmp', 'imports', "WorkbenchImport_#{eg_name}_#{$$}.zip"), 'wb') do |file| eg_stream.rewind file.write eg_stream.read file.close |
