From 3368bdb570c8086dd595c70ed0d0fccab92cc308 Mon Sep 17 00:00:00 2001 From: hanshuaikang <1758504262@qq.com> Date: Wed, 16 Aug 2023 16:37:47 +0800 Subject: [PATCH] =?UTF-8?q?minor:=20=E9=80=9A=E7=9F=A5=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itsm/ticket/models/ticket.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/itsm/ticket/models/ticket.py b/itsm/ticket/models/ticket.py index 3e471ce10..8b557322a 100644 --- a/itsm/ticket/models/ticket.py +++ b/itsm/ticket/models/ticket.py @@ -1513,7 +1513,8 @@ def priority_name(self): def ticket_url(self): if not self.notify_url: return "{site_url}/#/ticket/{ticket_id}/".format( - site_url=settings.TICKET_NOTIFY_HOST.rstrip("/"), ticket_id=self.id + site_url=settings.TICKET_NOTIFY_HOST.rstrip("/"), + ticket_id=self.id, ) return self.notify_url @@ -1552,11 +1553,12 @@ def generate_ticket_url(self, state_id, receivers): } ) client = Cache() - self.notify_url = "{site_url}/#/ticket/{ticket_id}/?token={token}&cache_key={cache_key}".format( + self.notify_url = "{site_url}/#/ticket/{ticket_id}/?token={token}&cache_key={cache_key}&step_id={step_id}".format( # noqa site_url=settings.TICKET_NOTIFY_HOST.rstrip("/"), ticket_id=self.id, token=ticket_token, cache_key=cache_key, + step_id=status.id, ) data = json.dumps({"state_id": state_id, "ticket_id": self.id}) client.set(cache_key, data, 60 * 60 * 24 * 30)