Netbox: AttributeError when creating VM

Created on 1 Sep 2020  路  4Comments  路  Source: netbox-community/netbox

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.

accepted bug

Most helpful comment

Running 2.9.3 and can confirm that I still see this error, disabling webhooks to workaround the issue

All 4 comments

Running 2.9.3 and can confirm that I still see this error, disabling webhooks to workaround the issue

We upgraded to v2.9.3 last night and it seems that creating a VM works with the webhook enabled but editing a VM still causes the same error.

@syreel you likely need to restart the RQ worker process. Testing prior to release confirmed that this bug has been fixed, so if you continue to experience issues after upgrading and restarting the RQ worker, please open a new bug listing the exact steps that someone else can take to replicate the observed issue.

I still seem to be having as well, opened #5109

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bellwood picture bellwood  路  3Comments

hoalex picture hoalex  路  3Comments

hellerve picture hellerve  路  3Comments

soer7022 picture soer7022  路  3Comments

cloos picture cloos  路  3Comments