Setting tags attribute for a rear_port/front_port conducts in HTTP error 500 #2881

Closed
opened 2025-12-29 18:23:04 +01:00 by adam · 2 comments
Owner

Originally created by @louis-6wind on GitHub (Sep 18, 2019).

Environment

  • Python version: 3.6.6
  • NetBox version: 2.5.13 & 2.6.3

Steps to Reproduce

  1. Add a device => ID 1
  2. Add a rear_port by API with data - usings tags => ID 1
    {
    "device": 1,
    "name": "5",
    "type": 2500,
    "positions": 12,
    "description": "",
    "tags": []
    }
  3. Add a rear_port by API with data => ID 2
    {
    "device": 1,
    "name": "1",
    "type": 2500,
    "positions": 12,
    "description": ""
    }
  4. Add a front_port by API with data - usings tags
    {'device_id': 1, 'name': '1', 'type': 2300, 'rear_port_id': 1, 'rear_port_position': 1, 'description': '', 'tags': []}
  5. Add a front_port by API with data
    {'device_id': 1, 'name': '2', 'type': 2300, 'rear_port_id': 2, 'rear_port_position': 1, 'description': ''}

ObservedBehavior

  • at step 2, rear_port is created but error 500 is reported
  • at step 3, rear_port is created without error
  • at step 4, front_port is created but error 500 is reported
  • at step 5, front_port is created without error

Expected Behavior

  • at step 2, rear_port is created without error
  • at step 4, front_port is created without error
Originally created by @louis-6wind on GitHub (Sep 18, 2019). ### Environment * Python version: 3.6.6 * NetBox version: 2.5.13 & 2.6.3 ### Steps to Reproduce 1. Add a device => ID 1 2. Add a rear_port by API with data - usings tags => ID 1 { "device": 1, "name": "5", "type": 2500, "positions": 12, "description": "", "tags": [] } 3. Add a rear_port by API with data => ID 2 { "device": 1, "name": "1", "type": 2500, "positions": 12, "description": "" } 4. Add a front_port by API with data - usings tags {'device_id': 1, 'name': '1', 'type': 2300, 'rear_port_id': 1, 'rear_port_position': 1, 'description': '', 'tags': []} 5. Add a front_port by API with data {'device_id': 1, 'name': '2', 'type': 2300, 'rear_port_id': 2, 'rear_port_position': 1, 'description': ''} ### ObservedBehavior - at step 2, rear_port is created but error 500 is reported - at step 3, rear_port is created without error - at step 4, front_port is created but error 500 is reported - at step 5, front_port is created without error ### Expected Behavior - at step 2, rear_port is created without error - at step 4, front_port is created without error
adam added the type: bugstatus: accepted labels 2025-12-29 18:23:04 +01:00
adam closed this issue 2025-12-29 18:23:04 +01:00
Author
Owner

@louis-6wind commented on GitHub (Sep 18, 2019):

Suggested solution. Remove tags attributes for front/rear ports

@louis-6wind commented on GitHub (Sep 18, 2019): Suggested solution. Remove tags attributes for front/rear ports
Author
Owner

@jeremystretch commented on GitHub (Sep 18, 2019):

The exception is due to the changelog routine not being able to parse tags correctly, but the root issue is that the front and rear port serializers don't inherit from TaggitSerializer as they should. Thank you for the report!

@jeremystretch commented on GitHub (Sep 18, 2019): The exception is due to the changelog routine not being able to parse tags correctly, but the root issue is that the front and rear port serializers don't inherit from `TaggitSerializer` as they should. Thank you for the report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2881