We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05c06eb commit b47dfb1Copy full SHA for b47dfb1
warehouse/legacy/api/xmlrpc/views.py
@@ -269,8 +269,15 @@ def changelog_since_serial(request, serial: StrictInt):
269
270
@xmlrpc_cache_all_projects(method="list_packages_with_serial")
271
def list_packages_with_serial(request):
272
- package_serial_tuples = request.db.query(Project.name, Project.last_serial).all()
273
- return dict(package_serial_tuples)
+ # Have PostgreSQL create the dictionary directly
+ query = select(
274
+ func.jsonb_object_agg(Project.name, Project.last_serial).label(
275
+ "package_serials"
276
+ )
277
278
+
279
+ result = request.db.execute(query).scalar()
280
+ return result or {}
281
282
283
# Package querying methods
0 commit comments