mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-13 12:39:52 +02:00
Compare commits
1 Commits
21869-scri
...
21682-upda
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de5178aad6 |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -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/"
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user