From 02bde49f753f54b29c304cd3df0990602d344459 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 11 Jan 2023 12:35:11 +0000 Subject: [PATCH] test: update tests --- app/services/imports/scheme_import_service.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/services/imports/scheme_import_service.rb b/app/services/imports/scheme_import_service.rb index e7440d393..56f19294d 100644 --- a/app/services/imports/scheme_import_service.rb +++ b/app/services/imports/scheme_import_service.rb @@ -49,12 +49,6 @@ module Imports attributes["arrangement_type"] = string_or_nil(xml_doc, "arrangement_type") attributes["owning_org_old_id"] = string_or_nil(xml_doc, "institution") attributes["owning_organisation_id"] = find_owning_organisation_id(attributes["owning_org_old_id"]) - attributes["management_org_old_visible_id"] = safe_string_as_integer(xml_doc, "agent") - attributes["managing_organisation_id"] = find_managing_organisation_id(attributes["management_org_old_visible_id"]) - - if attributes["arrangement_type"] == "D" && attributes["managing_organisation_id"].nil? - attributes["managing_organisation_id"] = attributes["owning_organisation_id"] - end attributes end @@ -65,14 +59,5 @@ module Imports organisation.id end - - def find_managing_organisation_id(old_visible_id) - return unless old_visible_id - - organisation = Organisation.find_by(old_visible_id:) - raise "Organisation not found with legacy visible ID #{old_visible_id}" if organisation.nil? - - organisation.id - end end end