Skip to content

Custom field on circuit terminations causes AttributeError in branches #355

@jnovinger

Description

@jnovinger

Plugin Version

v0.5.7

NetBox Version

v4.1.1

Python Version

3.8+

Steps to Reproduce

  1. Create a Site
  2. Create a circuit type
  3. Create a Provider
  4. Create a Custom Field Choice Set with the following choices:
    lc:LC
    sc:SC
    
  5. Create a custom field on circuit terminations:
    • Type: Selection
    • Name: termination_type
    • Choice set: Reference the choice set created above
  6. Create a circuit
  7. Create a branch and activate it
  8. In the branch, navigate to the circuit
  9. Attempt to create a circuit termination A:
    • Type: Site
    • Site: Select the existing site
    • Custom field: Select a value from the choice set

Expected Behavior

The circuit termination should be created successfully with the custom field value set.

Observed Behavior

A server error is thrown:

<class 'AttributeError'>

'NoneType' object has no attribute 'items'

Python version: 3.12.3
NetBox version: 4.4.4-Docker-3.4.1
Plugins:
  netbox_branching: 0.7.1

Note: The same operation works correctly in the main branch. The error only occurs when attempting to create circuit terminations with custom fields while a branch is active.

Metadata

Metadata

Assignees

Labels

app: branchingseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedstatus: duplicateThis issue or pull request already existstype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions