There was an error rendering the selected export template (): 'None' has no attribute 'rack' #3867

Closed
opened 2025-12-29 18:31:40 +01:00 by adam · 1 comment
Owner

Originally created by @tikitaru on GitHub (Jul 17, 2020).

Environment

Python version: 3.6.8
NetBox version: 2.8.6

I am creating an export template for dcim > cable and whenever I attempt to reference cable._termination_b_device.rack.facility_id I receive the error message in the title. I do not see the error returned on cable._termination_a_device.rack.facility_id though. Using Jinja2 for language

Steps to Reproduce

This errors
{% for cable in queryset %}
Rack: {{ cable._termination_a_device.rack.facility_id }}
Rack: {{ cable._termination_b_device.rack.facility_id }}
{% endfor %}

But this works fine:
{% for cable in queryset %}
Rack: {{ cable._termination_a_device.rack.facility_id }}
Rack: {{ cable._termination_b_device.rack }}
{% endfor %}

P.S. it functions if I do it from the cli nbshell

Originally created by @tikitaru on GitHub (Jul 17, 2020). ### **Environment** Python version: 3.6.8 NetBox version: 2.8.6 I am creating an export template for dcim > cable and whenever I attempt to reference cable._termination_b_device.rack.facility_id I receive the error message in the title. I do not see the error returned on cable._termination_a_device.rack.facility_id though. Using Jinja2 for language ### Steps to Reproduce This errors {% for cable in queryset %} Rack: {{ cable._termination_a_device.rack.facility_id }} Rack: {{ cable._termination_b_device.rack.facility_id }} {% endfor %} But this works fine: {% for cable in queryset %} Rack: {{ cable._termination_a_device.rack.facility_id }} Rack: {{ cable._termination_b_device.rack }} {% endfor %} P.S. it functions if I do it from the cli nbshell
adam closed this issue 2025-12-29 18:31:40 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 17, 2020):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

@jeremystretch commented on GitHub (Jul 17, 2020): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided [here](https://github.com/netbox-community/netbox/issues/new/choose). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3867