APISelect and APISelectMultiple in Custom Scripts leads to timeout #3407

Closed
opened 2025-12-29 18:28:48 +01:00 by adam · 0 comments
Owner

Originally created by @rodvand on GitHub (Feb 26, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.7.8

Steps to Reproduce

  1. Create custom script with the following code:
from extras.script import Script, ObjectVar
from utilities.forms import APISelect
from dcim.models import Device

class Test(Script):
    device = ObjectVar(
        queryset = Device.objects.all(),
        widget = APISelect(api_url = '/api/dcim/devices/'),
        )

    def run(self, data):
        pass
  1. Open the custom script in your favorite web browser

Expected Behavior

The website to load normally.

Observed Behavior

The website does not render, it just loads forever.

Removing the APISelect widget makes the website load properly again.

Originally created by @rodvand on GitHub (Feb 26, 2020). ### Environment * Python version: 3.6.8 * NetBox version: 2.7.8 ### Steps to Reproduce 1. Create custom script with the following code: ``` from extras.script import Script, ObjectVar from utilities.forms import APISelect from dcim.models import Device class Test(Script): device = ObjectVar( queryset = Device.objects.all(), widget = APISelect(api_url = '/api/dcim/devices/'), ) def run(self, data): pass ``` 2. Open the custom script in your favorite web browser <!-- What did you expect to happen? --> ### Expected Behavior The website to load normally. <!-- What happened instead? --> ### Observed Behavior The website does not render, it just loads forever. Removing the APISelect widget makes the website load properly again.
adam closed this issue 2025-12-29 18:28:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3407