Commit f87d5a84 authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Merge branch 'fix-avs-on_init-administrative-domain' into 'master'

Fix on_init attribute on administrative_domain model.

See merge request !2536
parents fa5ae076 4c3c8a69
Pipeline #15655 passed with stages
in 65 minutes and 18 seconds
......@@ -47,7 +47,7 @@ def _on_model_change(sender, instance, *args, **kwargs):
instance,
changed_fields=set(
f_name
for f_name in instance.initial_data
for f_name in getattr(instance, "initial_data", [])
if instance.initial_data[f_name] != getattr(instance, f_name)
),
)
......
......@@ -22,7 +22,7 @@ from noc.core.model.base import NOCModel
from noc.main.models.pool import Pool
from noc.main.models.remotesystem import RemoteSystem
from noc.core.model.fields import TagsField, DocumentReferenceField
from noc.core.model.decorator import on_delete_check
from noc.core.model.decorator import on_delete_check, on_init
from noc.core.bi.decorator import bi_sync
from noc.core.datastream.decorator import datastream
......@@ -30,6 +30,7 @@ id_lock = Lock()
_path_cache = cachetools.TTLCache(maxsize=1000, ttl=60)
@on_init
@bi_sync
@datastream
@on_delete_check(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment