Skip to content

Commit

Permalink
fix(core): Always set the organization to the ticket org when adding …
Browse files Browse the repository at this point in the history
…a ticket comment when org not specified.

ref: #248 #385 #388 nofusscomputing/centurion_erp_ui#23
  • Loading branch information
jon-nfc committed Nov 27, 2024
1 parent 10bade6 commit a60cf6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/core/serializers/ticket_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ def __init__(self, instance=None, data=empty, **kwargs):

if kwargs['context']['view'].action == 'create':

if 'ticket_id' in kwargs['context']['view'].kwargs:
if(
'ticket_id' in kwargs['context']['view'].kwargs
and not data['organization']
):

data['organization'] = Ticket.objects.get(
pk = int(self._kwargs['context']['view'].kwargs['ticket_id'])
Expand Down

0 comments on commit a60cf6c

Please sign in to comment.