Show mutable DBs first in API explorer, closes #1918

pull/1930/head
Simon Willison 2022-11-29 21:07:51 -08:00
rodzic 6b47734c04
commit 5518397338
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -371,6 +371,8 @@ class ApiExplorerView(BaseView):
"tables": tables,
}
)
# Sort so that mutable databases are first
databases.sort(key=lambda d: not self.ds.databases[d["name"]].is_mutable)
return databases
async def get(self, request):