Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A TypeError occurs when exporting inventory items with unnamed devices #2961

Closed
zelfix opened this issue Mar 5, 2019 · 0 comments
Closed
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@zelfix
Copy link

zelfix commented Mar 5, 2019

Environment

  • Python version: 3.6.7
  • NetBox version: 2.5.7

Steps to Reproduce

  1. Open the list of Inventory Items (Menu: Devices -> Inventory Items)
  2. There are inventory items linked with devices without a name
  3. Click the "Export" button

Expected Behavior

Download a csv file with a list of inventory items

Observed Behavior

<class 'TypeError'>
must be str, not int
image

Proposed solution

Change in the file 'netbox/dcim/models.py' 2426 line:

- self.device.name or '{' + self.device.pk + '}',
+ self.device.name or '{' + str(self.device.pk) + '}',
@DanSheps DanSheps added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Mar 5, 2019
@jeremystretch jeremystretch changed the title A TypeError occurs when exporting data from Inventory Items A TypeError occurs when exporting inventory items with unnamed devices Mar 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants