From c72cc1b8bb51e22ebd0f26e34593c8111d1f6be1 Mon Sep 17 00:00:00 2001 From: David May-Miller Date: Thu, 26 Oct 2023 14:53:11 +0100 Subject: [PATCH] CLDC-2895 Don't validate entities being updated in rake task --- lib/tasks/squish_names.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tasks/squish_names.rake b/lib/tasks/squish_names.rake index 238897d15..496bff419 100644 --- a/lib/tasks/squish_names.rake +++ b/lib/tasks/squish_names.rake @@ -2,18 +2,18 @@ desc "Squish names of locations, schemes, users, and organisations" task squish_names: :environment do Location.find_each do |location| location.name&.squish! - location.save! + location.save!(validate: false) end Scheme.find_each do |scheme| scheme.service_name&.squish! - scheme.save! + scheme.save!(validate: false) end User.find_each do |user| user.name&.squish! - user.save! + user.save!(validate: false) end Organisation.find_each do |organisation| organisation.name&.squish! - organisation.save! + organisation.save!(validate: false) end end