From 024d58e24dccf0d95e70295d04e6404d24ff7d8f Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Tue, 6 Oct 2026 23:30:07 -0500 Subject: [PATCH] Fixed: nextdns_sync diff compares allowlist/denylist sorted sync sorts both lists before pushing; diff compared API order, so allowlist reported DIFFERS on every target. Co-Authored-By: Claude Opus 5.5 --- nextdns_sync.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nextdns_sync.py b/nextdns_sync.py index 7488b59..02569e9 100644 --- a/nextdns_sync.py +++ b/nextdns_sync.py @@ -383,12 +383,20 @@ def diff_profiles() -> None: print(f"{'=' * 60}") for section in sections: - source_val = json.dumps(source.get(section, {}), sort_keys=True) + source_val = json.dumps( + alpha_sort_lists({section: source.get(section, {})})[section], + sort_keys=True, + ) diffs = [] for pid in PROFILE_SYNC_LIST: if pid is None or pid not in all_profiles: continue - target_val = json.dumps(all_profiles[pid].get(section, {}), sort_keys=True) + target_val = json.dumps( + alpha_sort_lists({section: all_profiles[pid].get(section, {})})[ + section + ], + sort_keys=True, + ) if source_val != target_val: diffs.append(profile_names[pid]) if diffs: