Skip to content

Conversation

@manulera
Copy link
Member

@manulera manulera commented Apr 11, 2024

Second attempt of #431, this one should pass tests after the fix from #435. closes #430

validation_rules, initial_value)
self.reference_type_uri = reference_type_uri
if self._sbol_owner is not None:
if self._sbol_owner is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this adjusted branch is ever taken, it will break on line 940, because it will attempt to assign to None.properties.

@tcmitchell : do you remember why we have this setting property_store to the empty list? It appears to be preventing initialization with init value from being done as expected in at least some cases.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not.

I think _sbol_owner is the pointer to the SBOL object that "owns" this object. It's possible this path was trying to mimic something in the C++ code.

I think if this change passes the new unit test, and this change does not fail any other unit tests, then it should be ok.

@manulera
Copy link
Member Author

manulera commented Apr 11, 2024

Hi @tcmitchell thanks for approving, but I think the if statement should be removed entirely. As @jakebeal if it would ever be true (may be impossible). Do you agree with this?

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.

Bug in ReferencedObject::__init__

3 participants