Skip to content

Conversation

@alfarok
Copy link
Contributor

@alfarok alfarok commented Sep 8, 2017

Purpose

This should have been included w/ PR-8131. I realized the bug when testing D4R UI node deserilazation in the current task.

If a selection node is added to the graph with no selection that graph would serialize the InstanceID property as null. This would cause the node to not deserialization properly due to the missing property and it would never be added to the graph when reopening. This PR initializes InstanceID w/ an empty list to avoid the null value.

I also verified all the RTF selection tests still pass with this change but we may want to add additional testing to catch this behavior in the future.

To reproduce:

  • add a selection node to the graph (without selecting anything)
  • save and close the graph
  • reopen and verify the node is missing

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@mjkkirschner @QilongTang

FYIs

@smangarole

@mjkkirschner
Copy link
Member

is it possible to add a regression test?

@alfarok
Copy link
Contributor Author

alfarok commented Sep 8, 2017

yes, will include it w/ the next PR that has the rest of the json constructors for the remaining 40 or so Revit UI nodes

@alfarok alfarok merged commit 7649ea2 into DynamoDS:master Sep 8, 2017
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.

2 participants