diff options
| author | Robert | 2017-10-23 13:30:57 +0200 |
|---|---|---|
| committer | Robert | 2017-10-24 15:28:45 +0200 |
| commit | f88df773cb31c9967430af0c3cd7bd9df46e46e0 (patch) | |
| tree | 41865abc47ae4fd254447a83cd998afcf33a128d /app | |
| parent | ddd885d2acec8a39a82dfb34e7810b52c8f01c94 (diff) | |
| download | chouette-core-f88df773cb31c9967430af0c3cd7bd9df46e46e0.tar.bz2 | |
Fixes: #4633@0.5h; Implenting correct message for inconsistent zip file
Diffstat (limited to 'app')
| -rw-r--r-- | app/workers/workbench_import_worker.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb index b28e96acc..80f458e1c 100644 --- a/app/workers/workbench_import_worker.rb +++ b/app/workers/workbench_import_worker.rb @@ -50,12 +50,17 @@ class WorkbenchImportWorker def update_object_state entry, count @workbench_import.update( current_step: count ) - # TODO: Determine the other attributes of the message, especially how to add the names - # of the spurious dirs entry.spurious unless entry.spurious.empty? - @workbench_import.messages.create(criticity: :warning, message_key: 'xxx') + @workbench_import.messages.create( + criticity: :warning, + message_key: 'inconsistent_zip_file', + message_attributes: { + 'import_name' => @workbench_import.name, + 'spurious_dirs' => entry.spurious.inspect + }) end end + def upload_entry_group entry, element_count update_object_state entry, element_count.succ # status = retry_service.execute(&upload_entry_group_proc(entry)) |
