mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-26 08:39:08 +01:00
fix(public): Fix the public ticket creation by passing user or None to the form.save() method
This commit is contained in:
parent
34eb793f68
commit
cf98b4a8e9
@ -97,7 +97,7 @@ class BaseCreateTicketView(abstract_views.AbstractCreateTicketMixin, FormView):
|
||||
# This submission is spam. Let's not save it.
|
||||
return render(request, template_name='helpdesk/public_spam.html')
|
||||
else:
|
||||
ticket = form.save()
|
||||
ticket = form.save(user=self.request.user if self.request.user.is_authenticated else None)
|
||||
try:
|
||||
return HttpResponseRedirect('%s?ticket=%s&email=%s&key=%s' % (
|
||||
reverse('helpdesk:public_view'),
|
||||
|
Loading…
Reference in New Issue
Block a user