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.")