mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
fix markdown bug
This commit is contained in:
parent
eb60b967c8
commit
ef63a1186b
@ -748,6 +748,10 @@ class Ticket(models.Model):
|
||||
def get_markdown(self):
|
||||
return get_markdown(self.description)
|
||||
|
||||
@property
|
||||
def get_resolution_markdown(self):
|
||||
return get_markdown(self.resolution)
|
||||
|
||||
|
||||
class FollowUpManager(models.Manager):
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
<th colspan='2'>{% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} <a href='?close'><button type="button" class="btn btn-warning btn-sm">{% trans "Accept and Close" %}</button></a>{% endifequal %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>{{ ticket.resolution|force_escape|urlizetrunc:50|linebreaksbr }}</td>
|
||||
<td colspan='2'>{{ ticket.get_resolution_markdown|urlizetrunc:50|linebreaksbr }}</td>
|
||||
</tr>{% endif %}
|
||||
<tr>
|
||||
<th>{% trans "Due Date" %}</th>
|
||||
|
@ -269,7 +269,7 @@ def followup_edit(request, ticket_id, followup_id):
|
||||
new_followup.user = followup.user
|
||||
new_followup.save()
|
||||
# get list of old attachments & link them to new_followup
|
||||
attachments = FolllowUpAttachment.objects.filter(followup=followup)
|
||||
attachments = FollowUpAttachment.objects.filter(followup=followup)
|
||||
for attachment in attachments:
|
||||
attachment.followup = new_followup
|
||||
attachment.save()
|
||||
@ -1581,7 +1581,7 @@ def attachment_del(request, ticket_id, attachment_id):
|
||||
if not _is_my_ticket(request.user, ticket):
|
||||
raise PermissionDenied()
|
||||
|
||||
attachment = get_object_or_404(FolllowUpAttachment, id=attachment_id)
|
||||
attachment = get_object_or_404(FollowUpAttachment, id=attachment_id)
|
||||
if request.method == 'POST':
|
||||
attachment.delete()
|
||||
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket_id]))
|
||||
|
Loading…
Reference in New Issue
Block a user