Project

Profile

Help

Issue #970 ยป sort_id_in_assoc_query.patch

jluza, 05/11/2015 01:25 PM

View differences:

server/pulp/server/managers/repo/unit_association_query.py
sort = criteria.unit_sort
if sort is None:
unit_key = types_db.type_units_unit_key(unit_type_id)
# dgregor - HACK - sort by _id so we use a single index
sort = [('_id', SORT_ASCENDING)]
if unit_key is not None:
sort = [(u, SORT_ASCENDING) for u in unit_key]
#unit_key = types_db.type_units_unit_key(unit_type_id)
#
#if unit_key is not None:
# sort = [(u, SORT_ASCENDING) for u in unit_key]
if sort is not None:
cursor.sort(sort)
    (1-1/1)