pynetbox icon indicating copy to clipboard operation
pynetbox copied to clipboard

extras.webhooks.create() returns non_field_errors

Open jinsiang2008 opened this issue 2 years ago • 3 comments

I am using extras.webhook to create a new webhook with different name, content_type, but the same payload_url, type_create, type_update, type_delete value, but got the error below:

modifying failed due to: {"non_field_errors":["The fields payload_url, type_create, type_update, type_delete must make a unique set."]}

I think it's a bug, it makes sense to use a webhook with the same payload_url, type_create, type_update, and type_delete value. Please take a look. Thanks.

jinsiang2008 avatar Jun 08 '22 06:06 jinsiang2008

Are you able to do the same in NetBox GUI? I'm asking because the error text is not from pynetbox, it is coming from NetBox API.

markkuleinio avatar Jun 13 '22 17:06 markkuleinio

Hi @markkuleinio , yes, I was able to set it via Netbox GUI, but if I set it via pynetbox, I got the error above.

jinsiang2008 avatar Jun 14 '22 13:06 jinsiang2008

Can you show the actual call you are making with pynetbox?

markkuleinio avatar Jun 14 '22 15:06 markkuleinio

Close for now since no need.

jinsiang2008 avatar Nov 03 '22 14:11 jinsiang2008