From 3c2b3073af961d9458abb15c407f67bf730d51b9 Mon Sep 17 00:00:00 2001 From: Oliver Kamer Date: Tue, 10 May 2022 19:29:39 +0200 Subject: [PATCH] sort by last and firstname --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index c363474..f1748a7 100644 --- a/main.py +++ b/main.py @@ -87,7 +87,7 @@ def name_formatter(nickname, firstname, lastname): ): people.append(get_people_details(person_id, group_id)) -people.sort(key=lambda p: p["last_name"]) +people.sort(key=lambda p: p["last_name"] + p["first_name"]) ahv_regex = re.compile("\d{3}.\d{4}.\d{4}.\d{2}") @@ -102,8 +102,6 @@ def name_formatter(nickname, firstname, lastname): print(f"Total: {len(people)}") print() -exit(0) - for p in people_without_ahv: f_name = name_formatter(p["nickname"], p["first_name"], p["last_name"]) url = p["href"].replace(".json", "")