From 80df31fc4e98ddf1ade94ff939668fa61ccf5ea9 Mon Sep 17 00:00:00 2001 From: Jake Jackson Date: Thu, 15 Jun 2023 14:45:23 -0400 Subject: [PATCH] [hop node] update peer validation logic (#14132) --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 5ab3be3ad2..51224488a3 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -5491,7 +5491,7 @@ class InstanceSerializer(BaseSerializer): if peers_from_control_nodes and node_type not in (Instance.Types.EXECUTION, Instance.Types.HOP): raise serializers.ValidationError(_("peers_from_control_nodes can only be enabled for execution or hop nodes.")) - if node_type in (Instance.Types.CONTROL): + if node_type == Instance.Types.CONTROL: if self.instance and 'peers' in attrs and set(self.instance.peers.all()) != set(attrs['peers']): raise serializers.ValidationError( _("Setting peers manually for control nodes is not allowed. Enable peers_from_control_nodes on the hop and execution nodes instead.")