nautobot-app-ssot icon indicating copy to clipboard operation
nautobot-app-ssot copied to clipboard

Custom 1-to-Many Relationships Error when defining Destination side

Open Renrut5 opened this issue 1 year ago • 3 comments

Environment

  • Python version: 3.8
  • Nautobot version: 2.1.2
  • nautobot-ssot version: 2.2.0

Expected Behavior

SSoT to create custom one to many relationships when defining the relationship from the destination side.

Observed Behavior

An error occurs as the returned value from _handle_custom_relationship_to_many_relationship method is always a list of objects regardless if it is 1-to-many or many-to-many.

When RelationshipSideEnum.DESTINATION is used on 1-to-many relationships, a single object is expected, not a list of objects.

Steps to Reproduce

  1. Define 1-to-many custom relationships in SSoT and build relationships from destination side

Renrut5 avatar Feb 06 '24 17:02 Renrut5

Can you share some code how we can reproduce this?

Kircheneer avatar Feb 08 '24 13:02 Kircheneer

Is this the same as #392 ?

Kircheneer avatar Mar 14 '24 12:03 Kircheneer

I have a fix, going to contribute it

chadell avatar Mar 14 '24 13:03 chadell

@chadell @Kircheneer , is this considered completed from the merge for #393 ?

Renrut5 avatar Jul 09 '24 13:07 Renrut5

IMO this can be closed, yes. Feel free to re-open in case you encounter any issues. Thanks!

Kircheneer avatar Jul 22 '24 11:07 Kircheneer