Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes es6. #193

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions invenio_vocabularies/contrib/names/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from elasticsearch_dsl.query import Q
from invenio_pidstore.errors import PIDDoesNotExistError
from invenio_records_resources.config import lt_es7

from .names import record_type

Expand Down Expand Up @@ -39,7 +38,7 @@ def resolve(self, identity, id_, id_type):
# the loading process needs to make sure of that
results = self._read_many(identity, es_query, max_records=1)
# cant use the results_item because it returns dicts intead of records
total = results.hits.total if lt_es7 else results.hits.total["value"]
total = results.hits.total["value"]
if total == 0:
# Not a PID but trated as such
raise PIDDoesNotExistError(pid_type=id_type, pid_value=id_)
Expand Down