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
  • Loading branch information
jon-nfc committed Nov 15, 2024
1 parent 317966b commit 3a63528
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/core/serializers/ticket_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ class Meta:

def __init__(self, instance=None, data=empty, **kwargs):

if 'view' in kwargs['context']:

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

data['organization'] = Ticket.objects.get(
pk = int(data['ticket'])
).organization.id


super().__init__(instance=instance, data=data, **kwargs)

if 'context' in kwargs:
Expand Down

0 comments on commit 3a63528

Please sign in to comment.