Sort routes

This commit is contained in:
Andrea Mistrali 2024-07-26 15:51:54 +02:00
parent 24ca9d59f6
commit 4b28db6a13
Signed by: andre
SSH Key Fingerprint: SHA256:/D780pZnuHMQ8xFII5lAtXWy8zdowtBhgWjwi88p+lI
1 changed files with 2 additions and 2 deletions

View File

@ -118,8 +118,8 @@ def user(userName):
def routes(): def routes():
routes = Route().list() routes = Route().list()
prefixes = set( prefixes = sorted(set(
(r.prefix for r in routes.routes if not r.prefix.endswith('/0'))) (r.prefix for r in routes.routes if not r.prefix.endswith('/0'))))
exitNodes = [r.node for r in routes.routes if r.prefix.endswith( exitNodes = [r.node for r in routes.routes if r.prefix.endswith(
'0/0') and r.enabled] '0/0') and r.enabled]