fix: 探测 authbook 在 root 组织下保存的情况

pull/6468/head
xinwen 3 years ago committed by Jiangjie.Bai
parent a0638dd5c4
commit 381b150c2b

@ -5,6 +5,7 @@ from django.db.models.signals import (
)
from django.dispatch import receiver
from orgs.utils import ensure_in_real_or_default_org
from common.const.signals import POST_ADD, POST_REMOVE, PRE_REMOVE
from common.utils import get_logger
from common.decorator import on_transaction_commit
@ -18,6 +19,12 @@ from assets.tasks import (
logger = get_logger(__file__)
@receiver(m2m_changed, sender=SystemUser.assets.through)
@ensure_in_real_or_default_org
def on_asset_system_user_change(sender, **kwargs):
pass
def update_asset_hardware_info_on_created(asset):
logger.debug("Update asset `{}` hardware info".format(asset))
update_assets_hardware_info_util.delay([asset])

Loading…
Cancel
Save