Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ar-api

* 'master' of https://github.com/datosgobar/series-tiempo-ar-api:
  Modifico la respuesta de busqueda de series
  • Loading branch information
abenassi committed Jun 26, 2018
2 parents 782e28c + a851dea commit 15c70ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 11 additions & 3 deletions series_tiempo_ar_api/apps/metadata/queries/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,17 @@ def execute(self):
}
for hit in response:
self.response['data'].append({
'id': hit['id'],
'description': hit['description'],
'title': hit['title'],
'field': {
'id': hit['id'],
'description': hit['description'],
'title': hit['title'],
},
'dataset': {
'title': hit['dataset_title'],
'publisher': {
'name': hit['dataset_publisher_name'],
}
}
})

self.response['limit'] = self.args[constants.PARAM_LIMIT]
Expand Down
2 changes: 2 additions & 0 deletions series_tiempo_ar_api/apps/metadata/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ def get_mock_search():
'id': 'algo',
'description': 'description',
'title': 'title',
'dataset_title': 'data_title',
'dataset_publisher_name': 'pub_name',
}]
return mock_search

0 comments on commit 15c70ee

Please sign in to comment.