Browse Source

rename method for ruby conventions

pull/1744/head
Arthur Campbell 3 years ago
parent
commit
9d422c967f
  1. 2
      app/services/imports/lettings_logs_import_service.rb
  2. 2
      app/services/imports/logs_import_service.rb
  3. 2
      app/services/imports/sales_logs_import_service.rb

2
app/services/imports/lettings_logs_import_service.rb

@ -66,7 +66,7 @@ module Imports
attributes["startdate"] = compose_date(xml_doc, "DAY", "MONTH", "YEAR")
attributes["owning_organisation_id"] = find_organisation_id(xml_doc, "OWNINGORGID")
attributes["managing_organisation_id"] = find_organisation_id(xml_doc, "MANINGORGID")
attributes["creation_method"] = get_creation_method(xml_doc)
attributes["creation_method"] = creation_method(xml_doc)
attributes["joint"] = unsafe_string_as_integer(xml_doc, "joint")
attributes["startertenancy"] = unsafe_string_as_integer(xml_doc, "_2a")
attributes["tenancy"] = unsafe_string_as_integer(xml_doc, "Q2b")

2
app/services/imports/logs_import_service.rb

@ -30,7 +30,7 @@ module Imports
"Manual Entry" => "single log",
}.freeze
def get_creation_method(xml_doc)
def creation_method(xml_doc)
upload_method = meta_field_value(xml_doc, "upload-method")
CREATION_METHODS[upload_method]
end

2
app/services/imports/sales_logs_import_service.rb

@ -31,7 +31,7 @@ module Imports
attributes["owning_organisation_id"] = find_organisation_id(xml_doc, "OWNINGORGID")
attributes["type"] = unsafe_string_as_integer(xml_doc, "DerSaleType")
attributes["old_id"] = meta_field_value(xml_doc, "document-id")
attributes["creation_method"] = get_creation_method(xml_doc)
attributes["creation_method"] = creation_method(xml_doc)
attributes["created_at"] = Time.zone.parse(meta_field_value(xml_doc, "created-date"))
attributes["updated_at"] = Time.zone.parse(meta_field_value(xml_doc, "modified-date"))
attributes["purchid"] = string_or_nil(xml_doc, "PurchaserCode")

Loading…
Cancel
Save