diff options
| author | Luc Donnet | 2015-05-12 16:24:48 +0200 |
|---|---|---|
| committer | Luc Donnet | 2015-05-12 16:24:48 +0200 |
| commit | 1ee52cce4c325a58368f3e28e8070f7b3bb4f4f2 (patch) | |
| tree | 6c7ca311fcbdc54199dbb5527cd03895081901f1 /app/models/import.rb | |
| parent | 42cda208c4413053c0462aff2eb623b45204be80 (diff) | |
| download | chouette-core-1ee52cce4c325a58368f3e28e8070f7b3bb4f4f2.tar.bz2 | |
Fix locales design and bugs Refs #0035551 #0035504
Diffstat (limited to 'app/models/import.rb')
| -rw-r--r-- | app/models/import.rb | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/app/models/import.rb b/app/models/import.rb index be469d282..733795bd8 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -2,17 +2,24 @@ require 'open-uri' class Import include JobConcern + + # def compliance_check_validation_report? + # end - def compliance_check_validation_report - Rails.cache.fetch("#{cache_key}/validation_report", expires_in: cache_expiration) do - report_path = links["validation_report"] - if report_path - response = Ievkit.get(report_path) - ComplianceCheckResult.new(response) - else - raise Ievkit::IevError("Impossible to access report path link for validation of import") - end - end + # def compliance_check_validation_report + # Rails.cache.fetch("#{cache_key}/validation_report", expires_in: cache_expiration) do + # report_path = links["validation_report"] + # if report_path + # response = Ievkit.get(report_path) + # ComplianceCheckResult.new(response) + # else + # raise Ievkit::IevError("Impossible to access report path link for validation of import") + # end + # end + # end + + def report? + links["action_report"].present? end def report @@ -27,6 +34,10 @@ class Import end end + def rule_parameter_set? + links["validation_params"].present? + end + def rule_parameter_set Rails.cache.fetch("#{cache_key}/validation_params", expires_in: cache_expiration) do rule_parameter_set_path = links["validation_params"] @@ -37,6 +48,10 @@ class Import end end end + + def compliance_check? + links["validation_report"].present? + end def compliance_check Rails.cache.fetch("#{cache_key}/validation_report", expires_in: cache_expiration) do @@ -62,6 +77,10 @@ class Import end end + def file_path? + links["data"].present? + end + def file_path links["data"] end |
