doorUpdater: Force consistent order of member levels
This commit is contained in:
parent
a9df94a5ad
commit
a6191a5b38
@ -2,6 +2,7 @@
|
||||
import sys
|
||||
import requests
|
||||
import csv
|
||||
from collections import OrderedDict
|
||||
from io import StringIO
|
||||
from hashlib import md5
|
||||
import os
|
||||
@ -77,7 +78,7 @@ def makeMember(member, doorAuth):
|
||||
|
||||
if member[doorAuth] == "Y" \
|
||||
and not member["Account on Hold"] == "Account on Hold":
|
||||
levels = {k: v for k, v in memberLevels.items() if member[k] == k}
|
||||
levels = OrderedDict(sorted([(k, v) for k, v in memberLevels.items() if member[k] == k]))
|
||||
out["Custom1"] = "|".join(levels.keys()).replace("&", "and")
|
||||
for index, schedule in enumerate(levels.values(), 1):
|
||||
#TODO: error if people have more than 8?
|
||||
|
Reference in New Issue
Block a user