Compare commits

..

1 Commits

Author SHA1 Message Date
Martin Hauser
de5178aad6 chore(ci): Update ruff-action to v4.0.0
Update ruff GitHub Action from v3.6.1 to v4.0.0 and bump ruff version
from 0.15.2 to 0.15.10 for latest linting improvements.

Fixes #21682
2026-04-13 10:43:31 +02:00
2 changed files with 9 additions and 2 deletions

View File

@@ -56,9 +56,9 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check Python linting & PEP8 compliance
uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1
uses: astral-sh/ruff-action@0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0
with:
version: "0.15.2"
version: "0.15.10"
args: "check --output-format=github"
src: "netbox/"

View File

@@ -5,6 +5,8 @@ from functools import cached_property
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.db.models import Q
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
@@ -187,3 +189,8 @@ class ScriptModule(PythonModuleMixin, JobsMixin, ManagedFile):
self.file_root = ManagedFileRootPathChoices.SCRIPTS
super().save(*args, **kwargs)
self.sync_classes()
@receiver(post_save, sender=ScriptModule)
def script_module_post_save_handler(instance, created, **kwargs):
instance.sync_classes()