Error 500 when create prefix with tenant id value throught API #1956

Closed
opened 2025-12-29 17:20:54 +01:00 by adam · 5 comments
Owner

Originally created by @rharo1 on GitHub (Aug 20, 2018).

Environment

  • Python version: 3.4.8
  • NetBox version: 2.4.3

Steps to Reproduce

Hello guys,

I updated to version 2.4.3 and when i try to create a new prefix with a tenant ID value throught API, i receive an 500 error, at version 2.3.4 it´s works.

Payload:
{ "family": 4,
"prefix": "10.241.233.176/28",
"status":1,
"is_pool": false,
"description": "Free",
"tenant":18 ,
"custom_fields": { "Additional Information Prefix": null }
}

URL that i send a post request:
http://IP-NETBOX/api/ipam/prefixes/

Return:
Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'TypeError'>

'Tenant' object is not iterable
If further assistance is required, please post to the NetBox mailing list.

Home Page

Create a prefix with a tenant ID associate, when i remove tenant from payload it´s works and create the prefix without tenant.

Originally created by @rharo1 on GitHub (Aug 20, 2018). ### Environment * Python version: 3.4.8 * NetBox version: 2.4.3 ### Steps to Reproduce Hello guys, I updated to version 2.4.3 and when i try to create a new prefix with a tenant ID value throught API, i receive an 500 error, at version 2.3.4 it´s works. **Payload:** { "family": 4, "prefix": "10.241.233.176/28", "status":1, "is_pool": false, "description": "Free", "tenant":18 , "custom_fields": { "Additional Information Prefix": null } } **URL that i send a post request:** http://IP-NETBOX/api/ipam/prefixes/ **Return:** Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'TypeError'> 'Tenant' object is not iterable If further assistance is required, please post to the NetBox mailing list. Home Page <!-- What did you expect to happen? --> Create a prefix with a tenant ID associate, when i remove tenant from payload it´s works and create the prefix without tenant.
adam closed this issue 2025-12-29 17:20:54 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 20, 2018):

Not able to reproduce this on v2.4.3.

@jeremystretch commented on GitHub (Aug 20, 2018): Not able to reproduce this on v2.4.3.
Author
Owner

@jeremystretch commented on GitHub (Sep 5, 2018):

Closing due to lack of activity.

@jeremystretch commented on GitHub (Sep 5, 2018): Closing due to lack of activity.
Author
Owner

@rharo1 commented on GitHub (Sep 26, 2018):

@jeremystretch , i try to create an VLAN through API and i have the same issue with tenant, role, site and group. I upgrade to v2.4.4 and it´s not working properly

@rharo1 commented on GitHub (Sep 26, 2018): @jeremystretch , i try to create an VLAN through API and i have the same issue with tenant, role, site and group. I upgrade to v2.4.4 and it´s not working properly
Author
Owner

@SesquipedalianDefenestrator commented on GitHub (Nov 21, 2018):

@rharo1 : double-check that you have installed djangorestframework version 3.8.1. Exactly 3.8.1 and not 3.8.2
https://github.com/digitalocean/netbox/issues/2527 for more details

@SesquipedalianDefenestrator commented on GitHub (Nov 21, 2018): @rharo1 : double-check that you have installed djangorestframework version 3.8.1. Exactly 3.8.1 and not 3.8.2 https://github.com/digitalocean/netbox/issues/2527 for more details
Author
Owner

@rharo1 commented on GitHub (Nov 21, 2018):

@rharo1 : double-check that you have installed djangorestframework version 3.8.1. Exactly 3.8.1 and not 3.8.2
#2527 for more details

Thanks for your help! Now it´s works like a charm.

@rharo1 commented on GitHub (Nov 21, 2018): > > > @rharo1 : double-check that you have installed djangorestframework version 3.8.1. Exactly 3.8.1 and not 3.8.2 > #2527 for more details Thanks for your help! Now it´s works like a charm.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1956