mirror of https://github.com/jumpserver/jumpserver
fix: ticket URL type
parent
1433c35ff9
commit
e8653c74cd
|
@ -1,7 +1,7 @@
|
|||
from django.db.models import TextChoices, IntegerChoices
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
TICKET_DETAIL_URL = '/ui/#/tickets/tickets/{id}'
|
||||
TICKET_DETAIL_URL = '/ui/#/tickets/tickets/{id}?type={type}'
|
||||
|
||||
|
||||
class TicketType(TextChoices):
|
||||
|
|
|
@ -20,7 +20,13 @@ class BaseTicketMessage(UserMessage):
|
|||
@property
|
||||
def ticket_detail_url(self):
|
||||
tp = self.ticket.type
|
||||
return urljoin(settings.SITE_URL, const.TICKET_DETAIL_URL.format(id=str(self.ticket.id)))
|
||||
return urljoin(
|
||||
settings.SITE_URL,
|
||||
const.TICKET_DETAIL_URL.format(
|
||||
id=str(self.ticket.id),
|
||||
type=tp
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def content_title(self):
|
||||
|
|
Loading…
Reference in New Issue