-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Package version (if known): 3.0.1
Describe the bug
The latestdoi badge link is failing when then record linked to latest published release has been deleted
Steps to Reproduce
- Integrate with a GitHub repository and release 2 versions
- Delete the latest record
- Go to
/badge/latestdoi/{github_repo_id} - The page fails with an internal error
Expected behavior
The page redirects to the latest non-deleted record (or at least to the tombstone of the latest deleted record?)
Screenshots (if applicable)
Additional context
Execution flow:
- This line retrieves the latest published release (but in our case, this latest published release is linked to the deleted record)
- Then this line tries to get the URL of the record linked to the release
- Since the record is deleted,
self.recordhere isNone, and accessing.dataraisesAttributeError: 'NoneType' object has no attribute 'data'. - The part resolving the record is in invenio_rdm_records/services/github/release
To be fixed in invenio-github and in upcoming invenio-vcs.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog 😴