-
Notifications
You must be signed in to change notification settings - Fork 151
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
fix: Handle undefined record attributes in templates to avoid rendering errors #2932
base: master
Are you sure you want to change the base?
fix: Handle undefined record attributes in templates to avoid rendering errors #2932
Conversation
* Handle missing 'type' in description rendering * Add the missing description type when the type is not specified. * closes inveniosoftware#2931
3c86a5d
to
b723bc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Samk13 this is amazing! It's like the fastest fix ever.
I've tested it on our instance and it solves the issue.
invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html
Outdated
Show resolved
Hide resolved
invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html
Outdated
Show resolved
Hide resolved
b723bc6
to
4cc21a0
Compare
* fix show_dates * fix _identifiers_for_group * fix show_related_identifiers by filtering with selectattr: https://jinja.palletsprojects.com/en/stable/templates/#jinja-filters.selectattr
4cc21a0
to
95c5d20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added separate commits to safely access values. Some of these checks might be unnecessary. If you think it's overkill in certain macros, let me know and I’ll revert them.
❤️ Thank you for your contribution!
Description
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Frontend
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: