~wgrant/launchpad/bugs-stormrangefactory

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bugtasksearch.py

  • Committer: William Grant
  • Date: 2012-02-14 05:37:07 UTC
  • Revision ID: william.grant@canonical.com-20120214053707-1imq9ftc6ddonfes
Initial mostly working attempt at StormRangeFactory for bug listings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
    """
211
211
    store = IStore(BugTask)
212
212
    orderby_expression, orderby_joins = _process_order_by(alternatives[0])
 
213
    print orderby_expression
213
214
    decorators = []
214
215
 
215
216
    if len(alternatives) == 1:
255
256
    if prejoins:
256
257
        decorators.insert(0, itemgetter(0))
257
258
 
258
 
    result.order_by(orderby_expression)
 
259
    result.order_by(*orderby_expression)
259
260
    return DecoratedResultSet(
260
261
        result,
261
262
        lambda row: reduce(lambda task, dec: dec(task), decorators, row),
807
808
        else:
808
809
            orderby_arg.append(BugTask.id)
809
810
 
810
 
    return tuple(orderby_arg), extra_joins
 
811
    return list(orderby_arg), extra_joins
811
812
 
812
813
 
813
814
def _require_params(params):