backend: fix bug in get_raked_items

Can't shuffle the result of a query directly