mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Story#105852786 - each time invoice is being sent to Directo, record is saved to DB
This commit is contained in:
parent
d3295e349c
commit
e99dbe9a18
1 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ class Directo < ActiveRecord::Base
|
|||
def self.dump_result_to_db mappers, xml
|
||||
Nokogiri::XML(xml).css("Result").each do |res|
|
||||
obj = mappers[res.attributes["docid"].value.to_i]
|
||||
obj.directo_records.first_or_create!(response: res.as_json.to_h)
|
||||
obj.directo_records.create!(response: res.as_json.to_h)
|
||||
obj.update_columns(in_directo: true)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue