Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/248.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix view error when displaying a peerendpointaddressfamily with no associated bgproutinginstance
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
</tr>
<tr>
<td>Routing Instance</td>
<td><a href="{% url 'plugins:nautobot_bgp_models:bgproutinginstance' pk=object.peer_endpoint.routing_instance.pk %}">{{ object.peer_endpoint.routing_instance }}</a></td>
{% if object.peer_endpoint.routing_instance and object.peer_endpoint.routing_instance != '' %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just the first check should be sufficient here.

Copy link
Author

@RaidAndFade RaidAndFade May 27, 2025

Choose a reason for hiding this comment

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

It was not in my testing, since the model is defined and set as "" apparently?

Copy link
Contributor

Choose a reason for hiding this comment

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

It was not in my testing, since the model is defined and set as "" apparently?

That points to instance of BGPRoutingInstance, so should be either instance of BGPRoutingInstance or None on PeerEndpoint model.

<td><a href="{% url 'plugins:nautobot_bgp_models:bgproutinginstance' pk=object.peer_endpoint.routing_instance.pk %}">{{ object.peer_endpoint.routing_instance }}</a></td>
{% else %}
<td><span class="text-muted">None</span></td>
{% endif %}
</tr>
<tr>
<td>Peer Endpoint</td>
Expand Down