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

Service: Scan method not generating correct RecordList #260

Open
jrcastro2 opened this issue Jun 10, 2021 · 1 comment
Open

Service: Scan method not generating correct RecordList #260

jrcastro2 opened this issue Jun 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jrcastro2
Copy link
Contributor

Package version (if known): v0.16.1

Describe the bug

When executing a the scan function of the service we are supposed to receive a RecordList and by accessing hits, each element should be a RecordItem but instead it's only a dict.

Steps to Reproduce

  1. Go to the terminal.
  2. Access invenio shell by typing invenio shell.
  3. Test the scan, here an example:
from invenio_rdm_records.proxies import current_rdm_records
from invenio_access.permissions import system_identity

service = current_rdm_records.records_service
records_list = service.scan(identity=system_identity)

for r in records_list.hits:
     print(r.__class__)
  1. Note that it's a dict when it should be a RecordItem.

Expected behavior

Get RecordItem instead of a dict.

Screenshots (if applicable)

Additional context

@jrcastro2 jrcastro2 added the bug Something isn't working label Jun 10, 2021
@ppanero ppanero added this to Triage in InvenioRDM June Team QA via automation Jun 10, 2021
@lnielsen lnielsen moved this from Triage to To do in InvenioRDM June Team QA Jun 23, 2021
@ppanero
Copy link
Member

ppanero commented Jun 23, 2021

Similar behaviour here inveniosoftware/invenio-vocabularies#52 (comment) from the read_all function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants