#16388: Move change logging signal handlers into core

This commit is contained in:
Jeremy Stretch
2024-08-01 12:58:11 -04:00
parent e32cfdf88c
commit 8e6987edbf
7 changed files with 210 additions and 186 deletions

View File

@@ -21,7 +21,6 @@ from netbox.registry import registry
from utilities.querysets import RestrictedQuerySet
from ..choices import *
from ..exceptions import SyncError
from ..signals import post_sync, pre_sync
__all__ = (
'AutoSyncRecord',
@@ -159,6 +158,8 @@ class DataSource(JobsMixin, PrimaryModel):
"""
Create/update/delete child DataFiles as necessary to synchronize with the remote source.
"""
from core.signals import post_sync, pre_sync
if self.status == DataSourceStatusChoices.SYNCING:
raise SyncError(_("Cannot initiate sync; syncing already in progress."))