Bug 16518 - layerindex: REST API ignores the "orderby" parameter
Summary: layerindex: REST API ignores the "orderby" parameter
Status: NEW
Alias: None
Product: Layer Index
Classification: Yocto Project Subprojects
Component: Layer Index (show other bugs)
Version: 6.1
Hardware: All Multiple
: Medium normal
Target Milestone: 6.2
Assignee: Tim Orling
QA Contact: apoorv sangal
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-11-16 04:19 UTC by Tim Orling
Modified: 2026-11-16 04:44 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Orling 2026-11-16 04:19:32 UTC
params_to_queryset() in layerindex/querysethelper.py validates orderby and works out the column and direction, but never calls order_by() on the queryset, so the parameter has no effect:

    /layerindex/api/layerItems/?orderby=name:asc
    /layerindex/api/layerItems/?orderby=name:desc

both return the same order. Either apply it (queryset.order_by(column)) or drop the parameter. Found while fuzz testing a bench instance.