diff --git a/series_tiempo_ar_api/apps/metadata/queries/query.py b/series_tiempo_ar_api/apps/metadata/queries/query.py index 0f2aa2ca..6c11340d 100644 --- a/series_tiempo_ar_api/apps/metadata/queries/query.py +++ b/series_tiempo_ar_api/apps/metadata/queries/query.py @@ -84,9 +84,9 @@ def execute(self): 'id': getattr(hit, 'id', None), 'description': getattr(hit, 'description', None), 'title': getattr(hit, 'title', None), - 'periodicity': getattr(hit, 'periodicity', None), - 'start_date': start_date, - 'end_date': end_date, + 'frequency': getattr(hit, 'periodicity', None), + 'time_index_start': start_date, + 'time_index_end': end_date, 'units': getattr(hit, 'units', None), }, 'dataset': { diff --git a/series_tiempo_ar_api/apps/metadata/tests/query_tests.py b/series_tiempo_ar_api/apps/metadata/tests/query_tests.py index 454cafe9..51fddd74 100644 --- a/series_tiempo_ar_api/apps/metadata/tests/query_tests.py +++ b/series_tiempo_ar_api/apps/metadata/tests/query_tests.py @@ -84,9 +84,9 @@ def test_enhanced_meta(self): with mock.patch.object(Search, 'execute', return_value=get_mock_search()): result = q.execute() - self.assertTrue(result['data'][0]['field']['periodicity'], mock_search.periodicity) - self.assertTrue(result['data'][0]['field']['start_date'], mock_search.start_date) - self.assertTrue(result['data'][0]['field']['end_date'], mock_search.end_date) + self.assertTrue(result['data'][0]['field']['frequency'], mock_search.periodicity) + self.assertTrue(result['data'][0]['field']['time_index_start'], mock_search.start_date) + self.assertTrue(result['data'][0]['field']['time_index_end'], mock_search.end_date) def test_catalog_id_filter_with_alias(self): alias = CatalogAlias.objects.create(alias='alias_id')