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

#initialize overrides a supplied dynamic_schema_id attribute #63

Open
aploshay opened this issue May 26, 2021 · 0 comments
Open

#initialize overrides a supplied dynamic_schema_id attribute #63

aploshay opened this issue May 26, 2021 · 0 comments

Comments

@aploshay
Copy link
Contributor

aploshay commented May 26, 2021

The #initialize method loads allinson_flex before assigning any supplied attributes:

      load_allinson_flex ## This is the new part
      assign_attributes(attributes) if attributes

When an object is initialized with a dynamic_schema_id value, this always ends up loading/building the newest dynamic schema since that value is not assigned until afterwards. A potential fix is:

      self.dynamic_schema_id = attributes&.delete(:dynamic_schema_id)
      load_allinson_flex ## This is the new part
      assign_attributes(attributes) if attributes

A full fix also depends on fixing #61

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

No branches or pull requests

1 participant