Skip to content

Commit

Permalink
Merge pull request #139 from ehenneken/single_indicators
Browse files Browse the repository at this point in the history
indicators for single paper
  • Loading branch information
ehenneken committed Jun 6, 2022
2 parents a749bd0 + 9aa920e commit 5041c52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metrics_service/tests/test_endpoints.py
Expand Up @@ -538,7 +538,7 @@ def test_get_everything_single_bibcode_no_types(self, mock_execute_SQL_query):
data=json.dumps({'bibcodes': testset[:1], 'types':[]}))
self.assertTrue(r.status_code == 200)
# Check that the right info is returned; nothing more, nothing less
expected = ['skipped bibcodes', 'basic stats', 'basic stats refereed', 'citation stats', 'citation stats refereed', 'histograms']
expected = ['skipped bibcodes', 'basic stats', 'basic stats refereed', 'citation stats', 'citation stats refereed', 'histograms', 'indicators', 'indicators refereed']
self.assertEqual(sorted(list(r.json.keys())), sorted(expected))

@mock.patch('metrics_service.models.execute_SQL_query', return_value=testdata)
Expand Down
2 changes: 1 addition & 1 deletion metrics_service/views.py
Expand Up @@ -65,7 +65,7 @@ def post(self):
elif len(bibcodes) == 1:
current_app.logger.debug('Metrics requested for single record')
if len(types) > 0:
types = [t for t in types if t in ['basic', 'citations', 'histograms']]
types = [t for t in types if t in ['basic', 'citations', 'histograms', 'indicators']]
# if len(types) == 0:
# types=['basic', 'citations', 'histograms']
if len(histograms) > 0:
Expand Down

0 comments on commit 5041c52

Please sign in to comment.