Skip to content

Custom scripts cannot change interfaces on devices created by itself in a branch #496

@GoepiGB

Description

@GoepiGB

Plugin Version

0.8.3

NetBox Version

v4.5.5 (docker image netboxcommunity/netbox:v4.5.5)

Python Version

3.12.3

Steps to Reproduce

  1. Create a fresh NetBox install
  2. Create a site
  3. Create a device role with the name 'switch'
  4. Create a device template with at least one interface
  5. Add this script to NetBox: https://github.com/GoepiGB/netbox-branching-issue-496/blob/main/BranchingTest.py
  6. Create a branch
  7. Run the script; select the site and device template created before, committing the changes is not necessary

Expected Behavior

The device is created, and the interface is assigned a description successfully

Observed Behavior

The script fails with a validation error:

ValidationError: {'__all__': ["Cannot modify interface '1' because it has been deleted in the main branch. Sync with the main branch to update."]}

Image

Running the script in the main branch works without error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    app: branchingseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownertype: 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