inveniosoftware / invenio-records-rest

Invenio records REST API module.
https://invenio-records-rest.readthedocs.io
MIT License
4 stars 63 forks source link

TypeError: 'RequestError' object is not callable #218

Closed PSvishnu93 closed 6 years ago

PSvishnu93 commented 6 years ago

To do sorting I added following lines of code to the app.py `app.config['RECORDS_REST_SORT_OPTIONS'] = { index_name: { 'project_name': dict(fields=['project_name'], title='Project Name', order=1), } }

Default sorting.

app.config['RECORDS_REST_DEFAULT_SORT'] = { index_name: { 'query': 'project_name', 'noquery': 'project_name', } }`

When I run the flask app I got the error "TypeError: 'RequestError' object is not callable".

PSvishnu93 commented 6 years ago

Solution : I made the below changes and code worked perfectly.

'project_name': dict(fields=['project_name.keyword'], title='Project Name', order=1)