EDX-651: Fix TypeError when sorting oa_items