Skip to content

bug: Error when accessing RelatedNode on a created device missing fields to query it #455

@FragmentedPacket

Description

@FragmentedPacket

Component

Python SDK

Infrahub SDK version

1.13.2

Current Behavior

We get the following error when attempting to access the peer of a RelatedNode that was used in the create function of an object and we attempt to get the peer later on.

ValueError: Node must have at least one identifier (ID or HFID) to query it.

In this case, we create a device using a model that we fetched on a different node, and then when we attempt to get the peer of device.model we encounter the error above.

Expected Behavior

This was a breaking change that was introduced recently, but the typename was not being set when we had it on the related node.

Steps to Reproduce

Example above.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions