From 11e538d417d7ff07b3d9156e55135eb1e76f628f Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Wed, 13 Jul 2022 11:31:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B7=A5=E5=8D=95=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E4=B8=8D=E6=94=AF=E6=8C=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=20(#8582)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng626 <1304903146@qq.com> --- apps/tickets/handlers/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/tickets/handlers/base.py b/apps/tickets/handlers/base.py index c48ce350b..81341ce8e 100644 --- a/apps/tickets/handlers/base.py +++ b/apps/tickets/handlers/base.py @@ -64,9 +64,14 @@ class BaseHandler: diff_context = {} if state != TicketState.approved: return diff_context + if self.ticket.type not in [TicketType.apply_asset, TicketType.apply_application]: return diff_context + # 企业微信,钉钉审批不做diff + if not hasattr(self.ticket, 'old_rel_snapshot'): + return diff_context + old_rel_snapshot = self.ticket.old_rel_snapshot current_rel_snapshot = self.ticket.get_local_snapshot() diff = set(current_rel_snapshot.items()) - set(old_rel_snapshot.items())