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

records: added link template for read_many calls. #502

Merged

Conversation

alejandromumo
Copy link
Member

@alejandromumo alejandromumo force-pushed the add_links_tpl_to_read_many branch from 4441e5b to 6aee359 Compare September 15, 2023 08:46
@@ -17,7 +17,9 @@ class RecordLink(Link):
@staticmethod
def vars(record, vars):
"""Variables for the URI template."""
vars.update({"id": record.pid.pid_value})
pid_value = getattr(record.pid, "pid_value", None)
Copy link
Member Author

@alejandromumo alejandromumo Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some records don't have record.pid.pid_value yet (e.g. drafts)

@alejandromumo alejandromumo force-pushed the add_links_tpl_to_read_many branch from 6aee359 to b77fb15 Compare September 15, 2023 14:18
@alejandromumo alejandromumo force-pushed the add_links_tpl_to_read_many branch from b77fb15 to 88f4c65 Compare September 15, 2023 14:52
@zzacharo zzacharo merged commit aaa5227 into inveniosoftware:master Sep 15, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants