From cbc049ce686a9d91c6488e2dd16ce80af023119d Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 10 Jun 2018 23:58:05 -0400 Subject: [PATCH] doorUpdater: Sort MembershipWorks CSV by last name so that output CSVs might be more consistent --- doorUpdater.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doorUpdater.py b/doorUpdater.py index 1cc9a66..0c682ab 100755 --- a/doorUpdater.py +++ b/doorUpdater.py @@ -113,6 +113,7 @@ def main(): data = getMembershipworksData() reader = csv.DictReader(StringIO(data)) members = list(reader) + members.sort(key=lambda x: x['Last Name']) if os.path.exists('/tmp/doorUpdaterLastHash'): with open('/tmp/doorUpdaterLastHash', 'r') as f: