05/05/22 - 13h30
parent
7bdc5720ce
commit
975921a9a6
|
@ -38,7 +38,7 @@ def add_user_message(diction):
|
|||
'''
|
||||
field_list = ['type', 'sender_mail', 'sender_tel', 'recever_mail', 'recever_tel', 'object', 'message',
|
||||
'token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city','user_postal',
|
||||
'user_latitude', 'user_longitude', 'user_state']
|
||||
'user_latitude', 'user_longitude', 'user_state', 'sender_name']
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list:
|
||||
|
@ -88,6 +88,11 @@ def add_user_message(diction):
|
|||
if diction['type']:
|
||||
new_diction['type'] = diction['type']
|
||||
|
||||
if ("sender_name" in diction.keys()):
|
||||
if diction['sender_name']:
|
||||
new_diction['sender_name'] = diction['sender_name']
|
||||
|
||||
|
||||
if ("sender_mail" in diction.keys()):
|
||||
if diction['sender_mail']:
|
||||
new_diction['sender_mail'] = diction['sender_mail']
|
||||
|
|
Loading…
Reference in New Issue