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

Do not call link_to_reportable if reportable does not exist #16063

Merged
merged 1 commit into from Apr 29, 2024

Conversation

krauselukas
Copy link
Contributor

We call the link_to_reportables helper on the report show view. This throws an nil exception when the reportable is deleted, since the reportable_type gets nullified as well. link_to_reportable works in on the email notification since the reportable_type is still available from the event payload, but we cannot retrieve it from the report record.

Fixes #16062

We call the `link_to_reportables` helper on the report show view.
This throws an `nil` exception when the reportable is deleted,
since the `reportable_type` gets nullified as well.
`link_to_reportable` works in on the email notification since the
`reportable_type` is still available from the event payload, but
we cannot retrieve it from the report record.

Fixes openSUSE#16062
@krauselukas krauselukas added the Frontend Things related to the OBS RoR app label Apr 26, 2024
@krauselukas
Copy link
Contributor Author

To not forget that we might need to follow up on this, this is just a quick fix... https://trello.com/c/QCKsR63j/118-refactor-the-usage-of-the-linktoreportables-helper

@krauselukas krauselukas merged commit 7233a59 into openSUSE:master Apr 29, 2024
21 checks passed
@krauselukas krauselukas deleted the fix/issue_16062 branch April 29, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Things related to the OBS RoR app
Projects
None yet
2 participants