From d8d383898179da8106fce756a910ac25fc63f8a2 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 16 Dec 2025 12:32:17 -0500 Subject: [PATCH] don't rename non-existing catapult_fwd --- lib/admin_actions/number_change.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/admin_actions/number_change.rb b/lib/admin_actions/number_change.rb index 23ec6ee48acca25fd9f98cee47e23a8e01ab3379..95dcc94ceafb2bba8f636848b0296ac5e71a210f 100644 --- a/lib/admin_actions/number_change.rb +++ b/lib/admin_actions/number_change.rb @@ -111,9 +111,11 @@ class AdminAction # If old_tel exists, it's still possible no catapult_fwd has been set. # However, if one exists, we should rename it. # If old_tel does not exist, it's not possible for catapult_fwd - # to exist, and it's not possible for there to be value. + # to exist, and it's not possible for there to be value # to set catapult_fwd to. That's out-of-scope for this command. def change_catapult_fwd! + return unless old_tel + REDIS.rename("catapult_fwd-#{old_tel}", "catapult_fwd-#{new_tel}") end