mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-14 04:47:42 +01:00
Compare commits
1 Commits
main
...
20442-call
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57fe5ee1ea |
@@ -89,6 +89,7 @@ class ManagedFile(SyncedDataMixin, models.Model):
|
||||
|
||||
with storage.open(self.full_path, 'wb+') as new_file:
|
||||
new_file.write(self.data_file.data)
|
||||
sync_data.alters_data = True
|
||||
|
||||
@cached_property
|
||||
def storage(self):
|
||||
|
||||
@@ -216,6 +216,7 @@ class Job(models.Model):
|
||||
|
||||
# Send signal
|
||||
job_start.send(self)
|
||||
start.alters_data = True
|
||||
|
||||
def terminate(self, status=JobStatusChoices.STATUS_COMPLETED, error=None):
|
||||
"""
|
||||
@@ -245,6 +246,7 @@ class Job(models.Model):
|
||||
|
||||
# Send signal
|
||||
job_end.send(self)
|
||||
terminate.alters_data = True
|
||||
|
||||
def log(self, record: logging.LogRecord):
|
||||
"""
|
||||
|
||||
@@ -178,9 +178,11 @@ class ScriptModule(PythonModuleMixin, JobsMixin, ManagedFile):
|
||||
name=name,
|
||||
is_executable=True,
|
||||
)
|
||||
sync_classes.alters_data = True
|
||||
|
||||
def sync_data(self):
|
||||
super().sync_data()
|
||||
sync_data.alters_data = True
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.file_root = ManagedFileRootPathChoices.SCRIPTS
|
||||
|
||||
@@ -113,6 +113,7 @@ class UserConfig(models.Model):
|
||||
|
||||
if commit:
|
||||
self.save()
|
||||
set.alters_data = True
|
||||
|
||||
def clear(self, path, commit=False):
|
||||
"""
|
||||
@@ -140,3 +141,4 @@ class UserConfig(models.Model):
|
||||
|
||||
if commit:
|
||||
self.save()
|
||||
clear.alters_data = True
|
||||
|
||||
Reference in New Issue
Block a user