aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/import.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/import.rb')
-rw-r--r--app/models/import.rb39
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