Skip to content

Commit

Permalink
Default channel_id to empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaitlyn Crawford committed Oct 25, 2017
1 parent 48a48f0 commit 0feac3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions casepro/backend/junebug.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def build_outgoing_message_json(self, outgoing, to_addr):
reply_to = ''
label = ''
inbound_created_on = outgoing.created_on
inbound_channel_id = None
inbound_channel_id = ""
else:
reply_to = outgoing.reply_to.text
label = ','.join([str(l) for l in outgoing.reply_to.labels.all()])
inbound_created_on = outgoing.reply_to.created_on
inbound_channel_id = outgoing.reply_to.metadata.get('channel_id', None)
inbound_channel_id = outgoing.reply_to.metadata.get('channel_id', "")

return {
'to': to_addr,
Expand Down
2 changes: 1 addition & 1 deletion casepro/backend/tests/test_junebug.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def hub_outgoing_callback(request):
'content': "That's great", 'inbound_created_on': '2016-11-17T10:30:00+00:00',
'outbound_created_on': '2016-11-17T10:30:00+00:00',
'label': '', 'reply_to': '', 'to': '+1234', 'user_id': 'C-002', 'helpdesk_operator_id': self.user1.id,
'inbound_channel_id': None})
'inbound_channel_id': ''})
headers = {'Content-Type': "application/json"}
resp = {
'status': 201,
Expand Down

0 comments on commit 0feac3d

Please sign in to comment.