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

Pushing default XML as BHoMObject fails #587

Closed
FraserGreenroyd opened this issue Sep 6, 2023 · 0 comments · Fixed by #588
Closed

Pushing default XML as BHoMObject fails #587

FraserGreenroyd opened this issue Sep 6, 2023 · 0 comments · Fixed by #588
Assignees
Labels
type:bug Error or unexpected behaviour

Comments

@FraserGreenroyd
Copy link
Contributor

If the default object (using the generic XML configuration) is a BHoMObject, the create fails. This is because T in CreateDefault<T>(IEnumerable<T> objects, XMLConfig config) is set to IBHoMObject following pre-processing by the base adapter as part of the Adapter workflow.

A workaround to check if the type is IBHoMObject and then set to the type of the first object resolves this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant