Custom Script Module Filename instead of name Attribute is displayed #8006

Closed
opened 2025-12-29 20:31:05 +01:00 by adam · 2 comments
Owner

Originally created by @v0tti on GitHub (May 4, 2023).

NetBox version

v3.5.0

Python version

3.9

Steps to Reproduce

  1. Create an new file called test.py with the following contents:
from extras.scripts import *
name = "Foobar"
class ThisIsAnTest(Script):
    class Meta:
        name = "Test Script"
  1. Add a new Custom Script and upload test.py.

Expected Behavior

I expect the module/file of the Custom Script to be named Foobar because it is set as the nameattribute.

Observed Behavior

The module/file at /extras/scripts/ is called test.

Originally created by @v0tti on GitHub (May 4, 2023). ### NetBox version v3.5.0 ### Python version 3.9 ### Steps to Reproduce 1. Create an new file called `test.py` with the following contents: ``` from extras.scripts import * name = "Foobar" class ThisIsAnTest(Script): class Meta: name = "Test Script" ``` 2. Add a new Custom Script and upload `test.py`. ### Expected Behavior I expect the module/file of the Custom Script to be named `Foobar` because it is set as the `name`attribute. ### Observed Behavior The module/file at `/extras/scripts/` is called `test`.
adam added the type: bugstatus: needs ownerpending closureseverity: low labels 2025-12-29 20:31:05 +01:00
adam closed this issue 2025-12-29 20:31:05 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 22, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Sep 22, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 22, 2023):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Oct 22, 2023): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8006