Changes between Initial Version and Version 2 of Ticket #33304


Ignore:
Timestamp:
Nov 19, 2021, 12:42:12 PM (3 years ago)
Author:
Simon Charette
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33304

    • Property Owner changed from nobody to Simon Charette
  • Ticket #33304 – Description

    initial v2  
    99{{{#!python
    1010class OrderBy(ExpressionList):
    11     template = 'ORDER BY %(expressions)'
     11    template = 'ORDER BY %(expressions)s'
    1212
    1313    def __init__(self, *expressions, *extra):
    1414        expressions = [
    15             (Sort(F(o[1:]), descending=True) if isinstance(o, str) and o[0] == '-' else o)
    16             for o in expressions
     15            (Sort(F(expr[1:]), descending=True) if isinstance(expr, str) and expr[0] == '-' else expr)
     16            for expr in expressions
    1717        ]
    1818        super().__init__(*expressions, **extra)
Back to Top