DCIM>Interface Connection Export Template - Form Factor Label Blank Output #1421

Closed
opened 2025-12-29 16:32:06 +01:00 by adam · 1 comment
Owner

Originally created by @nathbooth on GitHub (Nov 23, 2017).

Issue type

[ ] Feature request
[X] Bug report
[ ] Documentation

Environment

Python version: 3.5.2
NetBox version: 2.2.6
Description

When creating an export template for interface connections, if you include the form factor label as per the API call reference interface_a.form_factor.label there is no output returned, example export template below

{% for connection in queryset %}
{{connection.interface_a.device|addslashes}},{{connection.interface_a.name|addslashes}},{{connection.interface_a.form_factor.label|addslashes}},{{connection.interface_b.device.name|addslashes}},{{connection.interface_b.name|addslashes}},{{connection.interface_b.form_factor.label|addslashes}}
{% endfor %}

Originally created by @nathbooth on GitHub (Nov 23, 2017). Issue type [ ] Feature request [X] Bug report [ ] Documentation Environment Python version: 3.5.2 NetBox version: 2.2.6 Description When creating an export template for interface connections, if you include the form factor label as per the API call reference interface_a.form_factor.label there is no output returned, example export template below {% for connection in queryset %} {{connection.interface_a.device|addslashes}},{{connection.interface_a.name|addslashes}},{{connection.interface_a.form_factor.label|addslashes}},{{connection.interface_b.device.name|addslashes}},{{connection.interface_b.name|addslashes}},{{connection.interface_b.form_factor.label|addslashes}} {% endfor %}
adam closed this issue 2025-12-29 16:32:06 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 27, 2017):

The form_factor field doesn't have a label attribute. (Template variables differ somewhat from the API structure.) Referencing connection.interface_a.get_form_factor_display should return what you want.

@jeremystretch commented on GitHub (Nov 27, 2017): The `form_factor` field doesn't have a `label` attribute. (Template variables differ somewhat from the API structure.) Referencing `connection.interface_a.get_form_factor_display` should return what you want.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1421