Export does render custom fields. #4819

Closed
opened 2025-12-29 19:20:56 +01:00 by adam · 0 comments
Owner

Originally created by @SandMouse on GitHub (Apr 23, 2021).

NetBox version

v2.11.1

Python version

3.6

Steps to Reproduce

  1. Create export template "MyExport"
{% for address in queryset %}{% if address.cf_custom_0 %}

"{{address.cf_custom_1}}", "", "{{address.dns_name}}", "{{address.description}}", "{{address.cf_custom_2}}"

{% endif %}{% endfor %}
  1. Create export: IPAM > IP Addresses > Export > "MyExport"

  2. Save the file.

  3. Open file, file is empty

Expected Behavior

I expected that NetBox exports a file containg rows with the requested fields for records where the value of cf_custom_0 is True.

Observed Behavior

Exported file is empty.

Note

If I remove the if endif it returns all ip addresses but custom fields remain empty. Built in fields are properly populated.

Originally created by @SandMouse on GitHub (Apr 23, 2021). ### NetBox version v2.11.1 ### Python version 3.6 ### Steps to Reproduce 1. Create export template "MyExport" ``` {% for address in queryset %}{% if address.cf_custom_0 %} "{{address.cf_custom_1}}", "", "{{address.dns_name}}", "{{address.description}}", "{{address.cf_custom_2}}" {% endif %}{% endfor %} ``` 3. Create export: IPAM > IP Addresses > Export > "MyExport" 4. Save the file. 5. Open file, file is empty ### Expected Behavior I expected that NetBox exports a file containg rows with the requested fields for records where the value of `cf_custom_0` is `True`. ### Observed Behavior Exported file is empty. ### Note If I remove the `if` `endif` it returns all ip addresses but custom fields remain empty. Built in fields are properly populated.
adam added the type: bug label 2025-12-29 19:20:56 +01:00
adam closed this issue 2025-12-29 19:20:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4819