mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 09:23:39 +01:00
Fix a bug when assigned_to or merged_to were not passed in body
This commit is contained in:
parent
2b33de6b37
commit
88b234958a
@ -93,9 +93,9 @@ class TicketSerializer(serializers.ModelSerializer):
|
|||||||
data['body'] = data['description']
|
data['body'] = data['description']
|
||||||
# TicketForm needs id for ForeignKey (not the instance themselves)
|
# TicketForm needs id for ForeignKey (not the instance themselves)
|
||||||
data['queue'] = data['queue'].id
|
data['queue'] = data['queue'].id
|
||||||
if data['assigned_to']:
|
if data.get('assigned_to'):
|
||||||
data['assigned_to'] = data['assigned_to'].id
|
data['assigned_to'] = data['assigned_to'].id
|
||||||
if data['merged_to']:
|
if data.get('merged_to'):
|
||||||
data['merged_to'] = data['merged_to'].id
|
data['merged_to'] = data['merged_to'].id
|
||||||
|
|
||||||
ticket_form = TicketForm(data=data, queue_choices=queue_choices)
|
ticket_form = TicketForm(data=data, queue_choices=queue_choices)
|
||||||
|
Loading…
Reference in New Issue
Block a user