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

Add missing relationship check in Asset Transformer #13220

Merged
merged 1 commit into from Jun 28, 2023

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR simply checks to see if the model relationship exists on the asset being transformed before attempting to use one of it's properties like we do elsewhere in the transformer.

Fixes #13198

Type of change

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

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #23425: Add missing relationship check in AssetTransformer.

@what-the-diff
Copy link

what-the-diff bot commented Jun 28, 2023

PR Summary

  • Improved Asset Transformer Configuration
    The update in the AssetsTransformer.php file ensures that the eol field (end of line) is now assigned only when the model exists and when the eol property has a value. This will help avoid unnecessary assignments and ensure data consistency.

@snipe snipe merged commit a8d4494 into snipe:develop Jun 28, 2023
4 checks passed
@snipe
Copy link
Owner

snipe commented Jun 28, 2023

In theory, it shouldn’t even be possible to have an asset without a model tho?

@marcusmoore
Copy link
Collaborator Author

I think that is the case but someone ran into that issue and I noticed other places in the transformer doing checking for existence already. Maybe the model was soft deleted and not loaded in the controller?

@marcusmoore marcusmoore deleted the bug/sc-23425 branch June 28, 2023 16:18
@marcusmoore marcusmoore mentioned this pull request Jun 29, 2023
2 tasks
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