Add internal comment to events

This commit is contained in:
Raphael Michel
2017-07-07 11:27:59 +02:00
parent 6e65ae5306
commit 35979ed332
10 changed files with 118 additions and 10 deletions

View File

@@ -181,7 +181,9 @@ class OrderComment(OrderView):
if form.is_valid():
self.order.comment = form.cleaned_data.get('comment')
self.order.save()
self.order.log_action('pretix.event.order.comment', user=self.request.user)
self.order.log_action('pretix.event.order.comment', user=self.request.user, data={
'new_comment': form.cleaned_data.get('comment')
})
messages.success(self.request, _('The comment has been updated.'))
else:
messages.error(self.request, _('Could not update the comment.'))