Bug #1716
API: url points always to the africaans (af)
Resolution:
Description
When doing a request on the api with
https://qcat.wocat.net/en/api/v2/questionnaires
Problem:
every resulting questionnaire in the list points to the africaans language (af):
"count": 4,
"next": "",
"previous": "",
"results": [
{
"name": "Recuperación de prácticas tradicionales de producción, como estrategia productiva con resiliencia en Humahuaca",
"updated": "2017-03-01T09:52:39.264579Z",
"code": "technologies_1671",
"url": "/af/wocat/technologies/view/technologies_1671/",
"details": "/en/api/v2/questionnaires/technologies_1671/"
},
{
"name": "Ferias comunitarias campesinas como alternativa de comercialización para la mejora en la rentabilidad y mantenimiento de la actividad productiva tradicional",
"updated": "2017-03-01T08:32:50.231852Z",
"code": "technologies_1743",
"url": "/af/wocat/technologies/view/technologies_1743/",
"details": "/en/api/v2/questionnaires/technologies_1743/"
},
Solution:
It should point the the language used in the api request.
Updated by Sebastian Manger over 7 years ago
Two-fold solution:
- /af/ stems from the elasticsearch index - store language-agnostic urls when indexing questionnaires
- add language depending on request when returning api-response
Updated by Sebastian Manger over 7 years ago
- Assignee set to Kurt Gerber
- % Done changed from 0 to 90
Resolved on develop; request a quick check before going live.
Updated by Kurt Gerber over 7 years ago
- Status changed from Feedback to Resolved
Happy whith it.
Please deploy on qcat