From d39dd179be41cfeb5af42d952222824547f1fc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Meny?= Date: Tue, 12 Jul 2022 14:22:41 +0100 Subject: [PATCH] Rubocop --- app/services/imports/scheme_location_import_service.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/services/imports/scheme_location_import_service.rb b/app/services/imports/scheme_location_import_service.rb index ae20eafcd..f05381c3b 100644 --- a/app/services/imports/scheme_location_import_service.rb +++ b/app/services/imports/scheme_location_import_service.rb @@ -7,7 +7,7 @@ module Imports def create_scheme_location(xml_document) attributes = scheme_attributes(xml_document) schemes = Scheme.where(old_id: attributes["scheme_old_id"]) - raise "Scheme not found with legacy ID #{attributes["scheme_old_id"]}" if schemes.empty? + raise "Scheme not found with legacy ID #{attributes['scheme_old_id']}" if schemes.empty? if schemes.size == 1 && schemes.first.locations&.empty? scheme = update_scheme(schemes.first, attributes) @@ -55,7 +55,7 @@ module Imports primary_client_group: attributes["primary_client_group"], secondary_client_group: attributes["secondary_client_group"], sensitive: attributes["sensitive"], - end_date: attributes["end_date"] + end_date: attributes["end_date"], ) scheme end @@ -93,13 +93,13 @@ module Imports type_of_unit: attributes["type_of_unit"], old_visible_id: attributes["location_old_visible_id"], old_id: attributes["location_old_id"], - scheme: scheme, + scheme:, ) rescue ActiveRecord::RecordNotUnique - @logger.warn("Location is already present with legacy ID #{attributes["location_old_id"]}, skipping") + @logger.warn("Location is already present with legacy ID #{attributes['location_old_id']}, skipping") end else - @logger.warn("Location with legacy ID #{attributes["location_old_id"]} is expired (#{attributes["end_date"]}), skipping") + @logger.warn("Location with legacy ID #{attributes['location_old_id']} is expired (#{attributes['end_date']}), skipping") end end