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

OAISets: implement has_record #212

Open
ppanero opened this issue Feb 1, 2022 · 0 comments
Open

OAISets: implement has_record #212

ppanero opened this issue Feb 1, 2022 · 0 comments

Comments

@ppanero
Copy link
Member

ppanero commented Feb 1, 2022

With the new dynamic sets the old has_records does not work. It can be implemented but would require a full search:

    def has_record(self, record):
        """Check if the record blongs to the OAISet.

        :param record: Record to be checked.
        :type record: `invenio_records.api.Record` or derivative.
        """
        return self.spec in record.get('_oai', {}).get('sets', [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant