Skip to content

Commit 65f815e

Browse files
Merge branch 'staging' of https://github.com/weni-ai/flows into staging
2 parents 9b24f45 + cb49722 commit 65f815e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

temba/api/v2/serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ def _validate_and_assign_template(self, data, template_data, channel_data):
338338
"name": template.name,
339339
"uuid": str(template.uuid),
340340
"variables": template_data.get("variables", []),
341+
"locale": template_data.get("locale", None),
341342
}
342343

343344
except Template.DoesNotExist:

temba/api/v2/tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ def test_whatsapp_broadcasts(self, mock_queue_broadcast):
971971

972972
# try to send msg with an existing template
973973
expected_metadata = {
974-
"template": {"name": template.name, "uuid": template.uuid, "variables": []},
974+
"template": {"name": template.name, "uuid": template.uuid, "variables": [], "locale": None},
975975
"text": "Send a message",
976976
}
977977

@@ -1113,7 +1113,7 @@ def test_whatsapp_broadcasts(self, mock_queue_broadcast):
11131113
"contacts": [self.joe.uuid, self.frank.uuid],
11141114
"groups": [reporters.uuid],
11151115
"ticket": str(ticket.uuid),
1116-
"msg": {"template": {"uuid": template.uuid}, "variables": ["1"]},
1116+
"msg": {"template": {"uuid": template.uuid}, "variables": ["1"], "locale": None},
11171117
"channel": channel.uuid,
11181118
},
11191119
)
@@ -1148,7 +1148,7 @@ def test_whatsapp_broadcasts(self, mock_queue_broadcast):
11481148
"contacts": [self.joe.uuid, self.frank.uuid],
11491149
"groups": [reporters.uuid],
11501150
"ticket": str(ticket.uuid),
1151-
"msg": {"template": {"uuid": template.uuid, "variables": ["1"]}},
1151+
"msg": {"template": {"uuid": template.uuid, "variables": ["1"], "locale": None}},
11521152
"channel": channel.uuid,
11531153
},
11541154
)

0 commit comments

Comments
 (0)