Merge pull request #11520 from jbradberry/fix-register-peers

In register_peers, only check non-empty flags for the 1-cycle check
This commit is contained in:
Jeff Bradberry 2022-01-11 16:52:53 -05:00 committed by GitHub
commit 1ff52bab56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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