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 issue for empty nested array #173

Merged
merged 2 commits into from
Jun 4, 2024
Merged

Fixed issue for empty nested array #173

merged 2 commits into from
Jun 4, 2024

Conversation

manuelvanrijn
Copy link
Contributor

@manuelvanrijn manuelvanrijn commented Jun 3, 2024

After the introduction of #171, I found an issue with my nested model containing an array with no elements in it (due to default: []).

This PR first checks if the array is empty, before validating if all values are StoreModel::Model objects.

Copy link

@safakferhatkaya safakferhatkaya left a comment

Choose a reason for hiding this comment

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

great job. we will wait for this branch to merge to upgrade to 3.0.0.

safakferhatkaya referenced this pull request Jun 3, 2024
)

Resolved an issue where nested `StoreModel::Model` objects did not
inherit serialization options when the `as_json` method was called.
To address this, added two attributes to `StoreModel::Model` to
ensure proper inheritance of serialization settings.
@phinze
Copy link

phinze commented Jun 3, 2024

Hi there, it looks like this did not land before the upgrade was released, so upgrading to 3.0.0 yields a lot of NoMethodError: undefined method 'serialize_unknown_attributes?' for nil:NilClass errors.

Do you think you could merge this and cut a bugfix release?

Copy link
Owner

@DmitryTsepelev DmitryTsepelev left a comment

Choose a reason for hiding this comment

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

LGTM! I'm going to release 3.0.1 right away, thank you so much ☺️

@DmitryTsepelev DmitryTsepelev merged commit c5220d0 into DmitryTsepelev:master Jun 4, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants