diff options
| author | Robert | 2017-12-15 08:24:24 +0100 |
|---|---|---|
| committer | Robert | 2017-12-15 08:32:30 +0100 |
| commit | 443de38df52143f72d97308c28ac68f99e009757 (patch) | |
| tree | 376521ea3e78070c3548c622a878bba26c124cb5 /app | |
| parent | b6067ba25bff1dc95975be49e3f9a02a5932202a (diff) | |
| download | chouette-core-443de38df52143f72d97308c28ac68f99e009757.tar.bz2 | |
Fixes: #5281@1.2h; View specs and minor CR change from #50065281-workbench-import-structural-bug-reading-zip
- CR change from #5006, severity of zip file messages :warning -> :error
- View specs for showing import_messages
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/imports/_import_messages.html.slim | 9 | ||||
| -rw-r--r-- | app/workers/workbench_import_worker/object_state_updater.rb | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/app/views/imports/_import_messages.html.slim b/app/views/imports/_import_messages.html.slim index 7c3528184..9ab9226f7 100644 --- a/app/views/imports/_import_messages.html.slim +++ b/app/views/imports/_import_messages.html.slim @@ -1,11 +1,10 @@ - if import_messages.any? - dl - - import_messages.each do | import_message | - .error_message - dt + dl#import_messages + - import_messages.each do | import_message | + dt.import_message = import_message.criticity - dd + dd.import_message = t( ['import_messages', 'compliance_check_messages', import_message.message_key].join('.'), string_keys_to_symbols(import_message.message_attributes)) diff --git a/app/workers/workbench_import_worker/object_state_updater.rb b/app/workers/workbench_import_worker/object_state_updater.rb index e9cc081b7..67bdc0654 100644 --- a/app/workers/workbench_import_worker/object_state_updater.rb +++ b/app/workers/workbench_import_worker/object_state_updater.rb @@ -14,7 +14,7 @@ class WorkbenchImportWorker def update_foreign_lines entry return if entry.foreign_lines.empty? workbench_import.messages.create( - criticity: :warning, + criticity: :error, message_key: 'foreign_lines_in_referential', message_attributes: { 'source_filename' => workbench_import.file.file.file, @@ -25,7 +25,7 @@ class WorkbenchImportWorker def update_spurious entry return if entry.spurious.empty? workbench_import.messages.create( - criticity: :warning, + criticity: :error, message_key: 'inconsistent_zip_file', message_attributes: { 'source_filename' => workbench_import.file.file.file, |
