From 7a9fca7f7724c4fdaddd2ecd0f719ad9e50f23ca Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Tue, 11 Jan 2022 16:16:33 -0500 Subject: [PATCH] In register_peers, only check non-empty flags for the 1-cycle check --- awx/main/management/commands/register_peers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/management/commands/register_peers.py b/awx/main/management/commands/register_peers.py index 1e7f770f80..369dc62149 100644 --- a/awx/main/management/commands/register_peers.py +++ b/awx/main/management/commands/register_peers.py @@ -37,7 +37,7 @@ class Command(BaseCommand): # No 1-cycles for collection in ('peers', 'disconnect', 'exact'): - if options['source'] in options[collection]: + if options[collection] and options['source'] in options[collection]: raise CommandError(f"Source node {options['source']} may not also be in --{collection}.") # No 2-cycles