Skip to content

Commit

Permalink
Add condition in serializer to update queue_uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslinhares committed Oct 31, 2024
1 parent b0c6eba commit 073fcf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions weni/internal/tickets/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ class TicketerQueueSerializer(serializers.ModelSerializer):
class Meta:
model = TicketerQueue
fields = ("uuid", "name")

def to_internal_value(self, data):
data = data.copy()
data["queue_uuid"] = data.pop("uuid")
return super().to_internal_value(data)

0 comments on commit 073fcf0

Please sign in to comment.