From ab76d8cce078ed209257ac2f0df9e727752a4996 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Wed, 8 Feb 2023 19:32:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E8=B5=84=E6=BA=90=20dashboard=20=E4=B8=8D?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98=20(#9471)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Aaron3S --- apps/assets/signal_handlers/asset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/assets/signal_handlers/asset.py b/apps/assets/signal_handlers/asset.py index 0026d200e..55851f9c6 100644 --- a/apps/assets/signal_handlers/asset.py +++ b/apps/assets/signal_handlers/asset.py @@ -103,8 +103,9 @@ def on_asset_post_delete(instance: Asset, using, **kwargs): ) -def resend_to_asset_signals(sender, signal, **kwargs): - signal.send(sender=Asset, **kwargs) +@on_transaction_commit +def resend_to_asset_signals(sender, signal, instance, **kwargs): + signal.send(sender=Asset, instance=instance.asset_ptr, **kwargs) for model in (Host, Database, Device, Web, Cloud):