Skip to content

Conversation

@arthanson
Copy link
Collaborator

Fixes: #20465

On re-upload deletes the old file so storage_save won't create a new filename.

@arthanson arthanson marked this pull request as ready for review November 7, 2025 19:17
@arthanson arthanson requested review from a team and jeremystretch and removed request for a team November 7, 2025 19:17
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than handling this manually, we should be able to leverage the allow_overwrite argument when invoking the ScriptFileSystemStorage backend. AFAICT this can be accomplished by adding an option under the DEFAULT_STORAGES setting:

DEFAULT_STORAGES = {
    "scripts": {
        "BACKEND": "extras.storage.ScriptFileSystemStorage",
        "OPTIONS": {
            "allow_overwrite": True,
        },
    },
}

@arthanson arthanson closed this Nov 12, 2025
@jeremystretch jeremystretch deleted the 20465-script-upload branch November 13, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Script “Edit → Upload” creates a new file but NetBox continues to execute the old version

3 participants