def get_trials_links(sr): l = Trial.defendants_by_sr(sr) s = QueryishList(l) s._sort = [db_sort('new')] return s