mirror of
https://github.com/pretix/pretix.git
synced 2025-12-05 21:32:28 +00:00
Control: sort sales-channels desc
This commit is contained in:
@@ -103,15 +103,15 @@ def get_all_sales_channels():
|
||||
if _ALL_CHANNELS:
|
||||
return _ALL_CHANNELS
|
||||
|
||||
types = OrderedDict()
|
||||
channels = []
|
||||
for recv, ret in register_sales_channels.send(None):
|
||||
if isinstance(ret, (list, tuple)):
|
||||
for r in ret:
|
||||
types[r.identifier] = r
|
||||
channels += ret
|
||||
else:
|
||||
types[ret.identifier] = ret
|
||||
_ALL_CHANNELS = types
|
||||
return types
|
||||
channels.append(ret)
|
||||
channels.sort(key=lambda c: c.identifier, reverse=True)
|
||||
_ALL_CHANNELS = OrderedDict([(c.identifier, c) for c in channels])
|
||||
return _ALL_CHANNELS
|
||||
|
||||
|
||||
class WebshopSalesChannel(SalesChannel):
|
||||
|
||||
Reference in New Issue
Block a user