In register_peers, only check non-empty flags for the 1-cycle check

This commit is contained in:
Jeff Bradberry 2022-01-11 16:16:33 -05:00
parent db999b82ed
commit 7a9fca7f77

View File

@ -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