Skip to content

AttributeError when creating VM #5081

@laurence-syree

Description

@laurence-syree

Environment

  • Python version: 3.8.2
  • NetBox version: 2.9.2

Steps to Reproduce

  1. Setup fresh install of Netbox
  2. Add a custom field, name, description and options are unimportant, but the field type must be "selection"
  3. Add a webhook, name, description, and URL are unimportant, but it must be assigned to virtual machines, enabled, and set to trigger on create.
  4. Add a cluster type, names etc unimportant
  5. Create a VM (names/data unimportant)

Expected Behavior

VM is created

Observed Behavior

Error is thrown:

Got AttributeError when attempting to get a value for field `value` on serializer `CustomFieldChoiceSerializer`.
The serializer field might be named incorrectly and not match any attribute or key on the `str` instance.
Original exception text was: 'str' object has no attribute 'pk'.

Disabling the webhook is a temporary workaround for this issue to create vms.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: 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