CustomFieldChoice matching query does not exist When running export on device in queryset #1097

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

Originally created by @swright0803 on GitHub (Jul 12, 2017).

Issue type:bug report

Python version: 2.7.6
NetBox version: 2.0.8

Anytime a custom "Export Template" is ran against "devices" it errors out with an error code saying
<class 'extras.models.DoesNotExist'>

CustomFieldChoice matching query does not exist.

The report that is being ran is

{% for device in queryset %}
device: {{ device.name }}
{% endfor %}

This worked on our previous version (1.9.3)
screen shot 2017-07-12 at 3 17 11 pm

Originally created by @swright0803 on GitHub (Jul 12, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type:bug report <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:** 2.7.6 **NetBox version:** 2.0.8 <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. --> Anytime a custom "Export Template" is ran against "devices" it errors out with an error code saying <class 'extras.models.DoesNotExist'> CustomFieldChoice matching query does not exist. The report that is being ran is {% for device in queryset %} device: {{ device.name }} {% endfor %} This worked on our previous version (1.9.3) ![screen shot 2017-07-12 at 3 17 11 pm](https://user-images.githubusercontent.com/30127437/28135703-2a99746c-6715-11e7-89b7-6da2a424e0a4.png)
adam closed this issue 2025-12-29 16:28:49 +01:00
Author
Owner

@swright0803 commented on GitHub (Jul 12, 2017):

Have figured out the issue. The issue was with devices that were missing required custom fields, possibly dropped off during the upgrade. When I look at our old server, the information is filled out as null. Guessing that the "null" didnt transfer with the record.

@swright0803 commented on GitHub (Jul 12, 2017): Have figured out the issue. The issue was with devices that were missing required custom fields, possibly dropped off during the upgrade. When I look at our old server, the information is filled out as null. Guessing that the "null" didnt transfer with the record.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1097