ActionsColumn fails to render extra_buttons when actions tuple is empty #9952

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

Originally created by @kprince28 on GitHub (Jul 8, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0.7

Python Version

3.12

Steps to Reproduce

  • Created a table. In this table, there's a feature to show extra buttons next to each row. However, I noticed that these extra buttons don't show up when I set another feature called "actions" to an empty list.
  1. Initialize an ActionsColumn with an empty actions tuple and valid extra_buttons:
actions = columns.ActionsColumn(
    actions=(),
    extra_buttons=ACTIVATE_BUTTON
)
  1. Render the table and observe the output.

Expected Behavior

The extra buttons should render correctly even when the actions parameter is empty.

Observed Behavior

When I explicitly set actions to an empty tuple (actions=()), the extra buttons (ACTIVATE_BUTTON) do not appear. They only show up when actions are not defined at all or are set differently.

Originally created by @kprince28 on GitHub (Jul 8, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0.7 ### Python Version 3.12 ### Steps to Reproduce - Created a table. In this table, there's a feature to show extra buttons next to each row. However, I noticed that these extra buttons don't show up when I set another feature called "actions" to an empty list. 1. Initialize an `ActionsColumn` with an empty `actions` tuple and valid `extra_buttons`: ``` actions = columns.ActionsColumn( actions=(), extra_buttons=ACTIVATE_BUTTON ) ``` 2. Render the table and observe the output. ### Expected Behavior The extra buttons should render correctly even when the actions parameter is empty. ### Observed Behavior When I explicitly set actions to an empty tuple (actions=()), the extra buttons (ACTIVATE_BUTTON) do not appear. They only show up when actions are not defined at all or are set differently.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:24:53 +01:00
adam closed this issue 2025-12-29 21:24:53 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Jul 9, 2024):

Hi Prince, thanks for reporting this problem. I'm advancing it to needs owner status, and would love to assign it to you for work-through. Please advise and I or another maintainer will make it so.

@jeffgdotorg commented on GitHub (Jul 9, 2024): Hi Prince, thanks for reporting this problem. I'm advancing it to `needs owner` status, and would love to assign it to you for work-through. Please advise and I or another maintainer will make it so.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9952