From 3586b345c013d3af494ec8a68844cbafb2417228 Mon Sep 17 00:00:00 2001 From: Mikk Romulus Date: Thu, 31 Oct 2024 10:44:43 +0200 Subject: [PATCH] fix: Numbered by not correctly being set by changing networks --- app/models/network_interface.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/network_interface.rb b/app/models/network_interface.rb index cbedbbf0..0fed1eab 100644 --- a/app/models/network_interface.rb +++ b/app/models/network_interface.rb @@ -16,8 +16,8 @@ class NetworkInterface < ApplicationRecord accepts_nested_attributes_for :addresses, reject_if: proc { |attributes| attributes.all? { |key, value| value.blank? || value == '0' } } + after_save :update_numbered_actor, if: :network_id_previously_changed? after_save :network_change_cleanup - after_save :update_numbered_actor, if: :saved_change_to_network_id? validate :network_in_exercise