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

Handle already-deleted license files more gracefully #12679

Merged
merged 1 commit into from
Mar 15, 2023
Merged

Conversation

snipe
Copy link
Owner

@snipe snipe commented Mar 15, 2023

Edge case, but accidentally trying to delete a license file that was already deleted would trigger a 500.

Signed-off-by: snipe <snipe@snipe.net>
@shortcut-integration
Copy link

@what-the-diff
Copy link

what-the-diff bot commented Mar 15, 2023

  • The function destroy() in LicenseFilesController.php was changed to check if the license exists before deleting a file
  • A new translation string "log_does_not_exist" was added to general.php

Copy link
Collaborator

@spencerrlongg spencerrlongg left a comment

Choose a reason for hiding this comment

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

Since these are soft deleted I think there's a more Eloquent ™️ way to do this using ->trashed() or something of the ilk. I can refactor like that if you'd like. This is License Files - sorry, I see.

@snipe snipe merged commit b64d7e3 into develop Mar 15, 2023
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