False does not show up for Boolean fields in exported CSV. #3930

Closed
opened 2025-12-29 18:32:08 +01:00 by adam · 3 comments
Owner

Originally created by @srideviyedidha on GitHub (Aug 1, 2020).

Screen Shot 2020-07-31 at 10 20 23 PM

Environment

  • Python version: 3.7
  • NetBox version: 2.8

Steps to Reproduce

  1. Export Device Interfaces with some interfaces not enabled (enabled = False). (This issue applies to any or all boolean fields in any of NetBox objects)

Expected Behavior

Expected the CSV to show False for not enabled.

Observed Behavior

For not Enabled, no value shows up. While for enabled, boolean True shows up (which is expected behavior)
This is observed not just for interfaces, but for boolean fields in other entities also. False does not show up if the boolean field value is false in the exported CSV data.

Originally created by @srideviyedidha on GitHub (Aug 1, 2020). <img width="680" alt="Screen Shot 2020-07-31 at 10 20 23 PM" src="https://user-images.githubusercontent.com/33758202/89092996-0e725200-d37c-11ea-87d0-2a504ff4a749.png"> ### Environment * Python version: 3.7 * NetBox version: 2.8 ### Steps to Reproduce 1. Export Device Interfaces with some interfaces not enabled (enabled = False). (This issue applies to any or all boolean fields in any of NetBox objects) ### Expected Behavior Expected the CSV to show False for not enabled. ### Observed Behavior For not Enabled, no value shows up. While for enabled, boolean True shows up (which is expected behavior) This is observed not just for interfaces, but for boolean fields in other entities also. False does not show up if the boolean field value is false in the exported CSV data.
adam added the type: housekeeping label 2025-12-29 18:32:08 +01:00
adam closed this issue 2025-12-29 18:32:08 +01:00
Author
Owner

@DanSheps commented on GitHub (Aug 4, 2020):

Is there a specific bug this is causing or more for aesthetics?

@DanSheps commented on GitHub (Aug 4, 2020): Is there a specific bug this is causing or more for aesthetics?
Author
Owner

@srideviyedidha commented on GitHub (Sep 5, 2020):

I have not seen any bug that is causing this. So, yes, it is for aesthetics.

@srideviyedidha commented on GitHub (Sep 5, 2020): I have not seen any bug that is causing this. So, yes, it is for aesthetics.
Author
Owner

@jeremystretch commented on GitHub (Sep 15, 2020):

Arguments can be made both for and against this change, however I think it's reasonable to retain the current behavior if only to avoid introducing a potentially disruptive change with little benefit. (It's reasonable to assume that many users are relying on the absence of a value in this field to indicate "false," in which case populating the actual string "false" would equate to "true." Booleans are fun.)

Also, the export function itself is due for re-implementation in v2.10 under #4999: This may be revisited as part of that work.

@jeremystretch commented on GitHub (Sep 15, 2020): Arguments can be made both for and against this change, however I think it's reasonable to retain the current behavior if only to avoid introducing a potentially disruptive change with little benefit. (It's reasonable to assume that many users are relying on the absence of a value in this field to indicate "false," in which case populating the actual string "false" would equate to "true." Booleans are fun.) Also, the export function itself is due for re-implementation in v2.10 under #4999: This may be revisited as part of that work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3930