Skip to content

Conversation

@bahkauv70
Copy link
Contributor

@bahkauv70 bahkauv70 commented Dec 5, 2024

This PR fixes the handling of complex struct attributes which may be nil as well. Additional IsNil checks have been introduced to prevent accidental panics when handling members with a default value.
The same issue occured in a few other functions as well, e.g. HasAtttribute, SetAttribute and so on. This have been fixed as well.
Testing this suitable with unit tests is not yet possible with the current state of the generator. This has been discussed with @vicentepinto98 previously and will be added with a different PR (issue not yet created)

@bahkauv70 bahkauv70 force-pushed the fix/handling-nullable-complex-model-attributes branch 2 times, most recently from a7c98d6 to a089f87 Compare December 5, 2024 08:52
@bahkauv70 bahkauv70 force-pushed the fix/handling-nullable-complex-model-attributes branch from a089f87 to cfa1fe8 Compare December 5, 2024 12:31
@bahkauv70 bahkauv70 marked this pull request as ready for review December 5, 2024 12:36
@bahkauv70 bahkauv70 force-pushed the fix/handling-nullable-complex-model-attributes branch from cfa1fe8 to 421e5a3 Compare December 9, 2024 10:40
@bahkauv70 bahkauv70 merged commit b54e0ef into main Dec 11, 2024
22 checks passed
@bahkauv70 bahkauv70 deleted the fix/handling-nullable-complex-model-attributes branch December 11, 2024 14:56
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.

3 participants