diff --git a/apps/sspanel/views.py b/apps/sspanel/views.py index 88f1c90d0e..aa85cd0dc9 100644 --- a/apps/sspanel/views.py +++ b/apps/sspanel/views.py @@ -346,7 +346,10 @@ def get(self, request, pk): def post(self, request, pk): """添加回复""" - ticket = Ticket.objects.get(pk=pk) + ticket: Ticket = Ticket.objects.get(pk=pk) + if ticket.status == -1: + messages.error(request, "工单已经关闭,请开启新的工单", extra_tags="回复失败") + return HttpResponseRedirect(reverse("sspanel:ticket_detail", args=(pk,))) ticket.updated_at = get_current_datetime() ticket.save() message = request.POST.get("message", "")