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

[VariantBundle] Serializer: Allow $innerObject to be null #2058

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

aarongerig
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no

With this PR the value of $innerObject is allowed to be null when serializing a variant group. This prevents throwing an error when rendering the product detail page and thus makes this process more flexible.

@aarongerig aarongerig changed the title fix: allow $innerObject to be null [VariantBundle] Serializer: Allow $innerObject to be null Aug 19, 2022
@dpfaffenbauer
Copy link
Member

why can it be null?

@aarongerig
Copy link
Contributor Author

Because one of my color choices is basically a fallback value with no actual color code.
Bildschirmfoto 2022-08-19 um 08 43 30

All of the values which do not map to an existing color attribute are assigned this "other / unknown" color value.
Bildschirmfoto 2022-08-19 um 08 43 49

These values are fed by an external API, over which I do not have any control. This way I'm able to categorize those "other" values to this fallback attribute, which would be really flexible IMO.

@dpfaffenbauer
Copy link
Member

legit

@dpfaffenbauer dpfaffenbauer merged commit 5d79459 into coreshop:master Aug 19, 2022
@dpfaffenbauer dpfaffenbauer self-requested a review August 19, 2022 07:02
@dpfaffenbauer dpfaffenbauer added this to the 3.0.0 milestone Aug 19, 2022
@aarongerig
Copy link
Contributor Author

Thank you!

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.

2 participants