| Summary: | Secondary sorting criteria not working | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Belen Barros Pena <belen.barros.pena> |
| Component: | toaster | Assignee: | David Reyna <david.reyna> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | alexandru.damian, belen.barros.pena, cristiana.voicu, jessica.zhang |
| Version: | unspecified | ||
| Target Milestone: | 1.6 M5 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Belen Barros Pena
2014-03-06 15:52:49 UTC
toaster/master:213fef6e87cbf60d773e28d31653e3c626d4058e According to the Django documentation:
"To order by multiple fields (where the second field is used to disambiguate ordering in cases where the first is the same), use multiple arguments:
That is, the correct invocation is: order_by('bedrooms', 'bathrooms')."
So, the solution is to add a "ordering_secondary" parameter to "_get_queryset", and have each class pass its respective secondary sort column name.
commit 4638e52ed2e146c43890dc9fba28031f6cc583ad verified in master:3e528d3e4bc542ca2f654c54363c56af0fb9f61b |