Fix user list api

I changed it from an inline conditional to the try except to handle the list endpoint. `get_object()` raises an error in that case.