1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Ensure bootstrapping of config on start

This commit is contained in:
jeremystretch
2021-10-26 16:45:53 -04:00
parent 561e06e7f0
commit ff5c274048
3 changed files with 24 additions and 5 deletions

View File

@ -2,7 +2,6 @@ import logging
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.core.cache import cache
from django.db.models.signals import m2m_changed, post_save, pre_delete
from django.dispatch import receiver, Signal
from django_prometheus.models import model_deletes, model_inserts, model_updates
@ -173,5 +172,4 @@ def update_config(sender, instance, **kwargs):
"""
Update the cached NetBox configuration when a new ConfigRevision is created.
"""
cache.set('config', instance.data, None)
cache.set('config_version', instance.pk, None)
instance.cache()