Webhook condition for having a primary IP doesn't appear to be working #7491

Closed
opened 2025-12-29 20:24:03 +01:00 by adam · 1 comment
Owner

Originally created by @AesoSpadez on GitHub (Jan 10, 2023).

Originally assigned to: @kkthxbye-code on GitHub.

NetBox version

v3.4.2

Python version

3.10

Steps to Reproduce

  1. Create a webhook, content type 'DCIM > Device', all events, with the condition:
    { "and": [ { "attr": "primary_ip", "value": "", "negate": true } ] }
  2. Create a site, all defaults.
  3. Create a device role, all defaults.
  4. Create a manufacturer, all defaults.
  5. Create a device type, all defaults.
  6. Create a device.
  7. Go to the admin panel, check the jobs in the default queue.

Expected Behavior

The webhook does not fire due to the condition of requiring a primary IP.

Observed Behavior

The webhook fires (despite the condition).

Originally created by @AesoSpadez on GitHub (Jan 10, 2023). Originally assigned to: @kkthxbye-code on GitHub. ### NetBox version v3.4.2 ### Python version 3.10 ### Steps to Reproduce 1. Create a webhook, content type 'DCIM > Device', all events, with the condition: `{ "and": [ { "attr": "primary_ip", "value": "", "negate": true } ] }` 2. Create a site, all defaults. 3. Create a device role, all defaults. 4. Create a manufacturer, all defaults. 5. Create a device type, all defaults. 6. Create a device. 7. Go to the admin panel, check the jobs in the default queue. ### Expected Behavior The webhook does not fire due to the condition of requiring a primary IP. ### Observed Behavior The webhook fires (despite the condition).
adam added the type: bugstatus: accepted labels 2025-12-29 20:24:03 +01:00
adam closed this issue 2025-12-29 20:24:03 +01:00
Author
Owner

@AesoSpadez commented on GitHub (Jan 10, 2023):

Seems to be similar/related to #10519 . We see this issue on our prod instance as well (v3.3.5, python 3.8).

@AesoSpadez commented on GitHub (Jan 10, 2023): Seems to be similar/related to #10519 . We see this issue on our prod instance as well (v3.3.5, python 3.8).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7491