Sort exporters by name alphabetically

This commit is contained in:
Raphael Michel
2019-01-31 18:44:12 +01:00
parent f32c581a9e
commit 6f980b82ac
3 changed files with 4 additions and 5 deletions

View File

@@ -1581,8 +1581,7 @@ class ExportMixin:
def exporters(self):
exporters = []
responses = register_data_exporters.send(self.request.event)
for receiver, response in responses:
ex = response(self.request.event)
for ex in sorted([response(self.request.event) for r, response in responses], key=lambda ex: str(ex.verbose_name)):
if self.request.GET.get("identifier") and ex.identifier != self.request.GET.get("identifier"):
continue