Python formatting

This commit is contained in:
Mouse Reeve 2021-03-28 13:41:25 -07:00
parent 7373a7e8c4
commit 5416bb10fd

View file

@ -28,8 +28,8 @@ class Federation(View):
servers = models.FederatedServer.objects.all() servers = models.FederatedServer.objects.all()
sort = request.GET.get('sort') sort = request.GET.get("sort")
sort_fields = ['created_date', 'application_type', 'server_name'] sort_fields = ["created_date", "application_type", "server_name"]
if sort in sort_fields + ["-{:s}".format(f) for f in sort_fields]: if sort in sort_fields + ["-{:s}".format(f) for f in sort_fields]:
servers = servers.order_by(sort) servers = servers.order_by(sort)