Error when adding data source when webhook on this event exists #8847

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

Originally created by @venomnom on GitHub (Nov 16, 2023).

NetBox version

v3.6.5

Python version

3.11

Steps to Reproduce

  1. Create a webhook with content type: "Core > Data Source" and event: Creations.
  2. In Operations -> Data Sources, create a new one with arbitrary data
  3. Error

Expected Behavior

Creates the data source without any errors

Observed Behavior

An error occurs but data source gets created regardless

Error from logs:

django.request ERROR: Internal Server Error: /core/data-sources/add/
Traceback (most recent call last):
  File "/opt/netbox/dev/venv/lib64/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/dev/netbox/netbox/middleware.py", line 46, in __call__
    with change_logging(request):
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/opt/netbox/dev/netbox/extras/context_managers.py", line 21, in change_logging
    flush_webhooks(webhooks_queue.get())
  File "/opt/netbox/dev/netbox/extras/webhooks.py", line 121, in flush_webhooks
    retry=get_rq_retry()
          ^^^^^^^^^^^^^^
  File "/opt/netbox/dev/netbox/utilities/rqworker.py", line 36, in get_rq_retry
    return Retry(max=retry_max, interval=retry_interval)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/dev/venv/lib64/python3.11/site-packages/rq/job.py", line 1628, in __init__
    if max < 1:
       ^^^^^^^
TypeError: '<' not supported between instances of 'list' and 'int'```
Originally created by @venomnom on GitHub (Nov 16, 2023). ### NetBox version v3.6.5 ### Python version 3.11 ### Steps to Reproduce 1. Create a webhook with content type: "Core > Data Source" and event: Creations. 2. In Operations -> Data Sources, create a new one with arbitrary data 3. Error ### Expected Behavior Creates the data source without any errors ### Observed Behavior An error occurs but data source gets created regardless Error from logs: ``` django.request ERROR: Internal Server Error: /core/data-sources/add/ Traceback (most recent call last): File "/opt/netbox/dev/venv/lib64/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/dev/netbox/netbox/middleware.py", line 46, in __call__ with change_logging(request): File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__ next(self.gen) File "/opt/netbox/dev/netbox/extras/context_managers.py", line 21, in change_logging flush_webhooks(webhooks_queue.get()) File "/opt/netbox/dev/netbox/extras/webhooks.py", line 121, in flush_webhooks retry=get_rq_retry() ^^^^^^^^^^^^^^ File "/opt/netbox/dev/netbox/utilities/rqworker.py", line 36, in get_rq_retry return Retry(max=retry_max, interval=retry_interval) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/dev/venv/lib64/python3.11/site-packages/rq/job.py", line 1628, in __init__ if max < 1: ^^^^^^^ TypeError: '<' not supported between instances of 'list' and 'int'```
adam closed this issue 2025-12-29 20:42:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 28, 2023):

I'm not able to reproduce this on NetBox v3.6.5. You likely have an error in your configuration. Check that RQ_RETRY_MAX is defined as an integer, not a list (or remove it to accept the default value).

@jeremystretch commented on GitHub (Nov 28, 2023): I'm not able to reproduce this on NetBox v3.6.5. You likely have an error in your configuration. Check that [`RQ_RETRY_MAX`](https://docs.netbox.dev/en/stable/configuration/miscellaneous/#rq_retry_max) is defined as an integer, not a list (or remove it to accept the default value).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8847