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

Fixed 500 error when sending unaccepted assets reminder #11700

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented Aug 18, 2022

Description

In the Unaccepted Assets report, users can resend reminders to users that haven't accepted or declined assets that require acceptance.

But to get some of the data needed in the notification, we associate the action_logs table with the checkout_acceptances using the column created_at in both tables. This is because an asset can have "n" registers in the action_logs and we want to only link the one that's created when the asset got checked out. The problem is that I found data on the checkout_acceptances table with a null value in the created_at column, so it can't get associate with the correspondent action log, and when the system needs that data to create the notifications it fails with an error 500.

This PR return with an error if that column have a null value instead of fail, but maybe there' s a better way to handle this, since the data that it needs doesn´t look that important, let me know what you think.

Fixes freshdesk 30231

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 8.1
  • MySQL version: 8.0.23
  • Webserver version: nginx/1.19.8
  • OS version: Debian 10

Checklist:

@snipe snipe merged commit 482a7b2 into snipe:develop Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants