diff options
| author | Alban Peignier | 2018-05-09 15:41:06 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2018-05-09 15:41:06 +0200 | 
| commit | d0ab0eb848a96587ac0e0ab26db962c15e559185 (patch) | |
| tree | c6fbe30673b7bffac514b6e264b228bed5b7311d /app/workers | |
| parent | 9684831ac650d633ddfab1062e2285f9482b1157 (diff) | |
| download | chouette-core-d0ab0eb848a96587ac0e0ab26db962c15e559185.tar.bz2 | |
Associate ComplianceControlSet with parent operation when created. Refs #6960
Diffstat (limited to 'app/workers')
| -rw-r--r-- | app/workers/compliance_control_set_copy_worker.rb | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/app/workers/compliance_control_set_copy_worker.rb b/app/workers/compliance_control_set_copy_worker.rb index 337b92f4b..b87f5ad8e 100644 --- a/app/workers/compliance_control_set_copy_worker.rb +++ b/app/workers/compliance_control_set_copy_worker.rb @@ -1,8 +1,10 @@  class ComplianceControlSetCopyWorker    include Sidekiq::Worker -  def perform(control_set_id, referential_id) +  def perform(control_set_id, referential_id, parent_type = nil, parent_id = nil)      check_set = ComplianceControlSetCopier.new.copy(control_set_id, referential_id) +    check_set.update parent_type: parent_type, parent_id: parent_id if parent_type && parent_id +      begin        Net::HTTP.get(URI("#{Rails.configuration.iev_url}/boiv_iev/referentials/validator/new?id=#{check_set.id}"))      rescue Exception => e | 
