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

Set qty mutators #13924

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Set qty mutators #13924

merged 1 commit into from
Jan 24, 2024

Conversation

snipe
Copy link
Owner

@snipe snipe commented Nov 22, 2023

This should hopefully solve a user error issue where the qty column is not set or is null in the importer. It just checks that $value (in this case qty) is not null, and if it is, it sets it to 0.

This should fix RB-16959/SC-20167.

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

what-the-diff bot commented Nov 22, 2023

PR Summary

  • Introduction of setQtyAttribute function in three models
    A new function called setQtyAttribute has been introduced in the Accessory.php, Component.php, and Consumable.php models. This function is designed to set up a quantity or 'qty' attribute, especially when no value is provided. It ensures the quantity doesn't remain undefined by assigning a default value of 0. This will help maintain the consistency and integrity of the data stored in these models.

@snipe
Copy link
Owner Author

snipe commented Nov 22, 2023

@bzeus I'd love to have you hammer on this when the holiday break is over to test it thoroughly. <3

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Did some testing locally and it looks good to me 👍🏾

@snipe snipe merged commit 165f954 into develop Jan 24, 2024
7 checks passed
@snipe snipe deleted the bug/sc-20167 branch January 24, 2024 18:21
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