We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9da19c0 commit 89e8fd9Copy full SHA for 89e8fd9
modules/Drawbridge/commands/tournament.py
@@ -76,8 +76,11 @@ def better_lambda(self, div):
76
77
try:
78
return priority_order.index(div['division_name'])
79
- except:
80
- return div['division_id']
+ except ValueError:
+ # If not in priority list, sort alphanumerically by division_name
81
+ return len(priority_order) + hash(str(div['division_name']))
82
+ except Exception:
83
+ return div.get('division_id', 9999)
84
85
async def update_launchpad(self):
86
# purge all messages in the launchpad channel
0 commit comments