mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#11558: Set data_synced time under model's clean()
This commit is contained in:
@@ -141,7 +141,6 @@ class ConfigContext(SyncedDataMixin, ChangeLoggedModel):
|
||||
Synchronize context data from the designated DataFile (if any).
|
||||
"""
|
||||
self.data = self.data_file.get_data()
|
||||
self.data_synced = timezone.now()
|
||||
|
||||
|
||||
class ConfigContextModel(models.Model):
|
||||
@@ -227,7 +226,6 @@ class ConfigTemplate(SyncedDataMixin, ExportTemplatesMixin, TagsMixin, ChangeLog
|
||||
Synchronize template content from the designated DataFile (if any).
|
||||
"""
|
||||
self.template_code = self.data_file.data_as_string
|
||||
self.data_synced = timezone.now()
|
||||
|
||||
def render(self, context=None):
|
||||
"""
|
||||
|
||||
@@ -354,7 +354,6 @@ class ExportTemplate(SyncedDataMixin, ExportTemplatesMixin, ChangeLoggedModel):
|
||||
Synchronize template content from the designated DataFile (if any).
|
||||
"""
|
||||
self.template_code = self.data_file.data_as_string
|
||||
self.data_synced = timezone.now()
|
||||
|
||||
def render(self, queryset):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user