05/05/22 - 13h30

master
ChérifBALDE 2022-05-05 13:33:42 +02:00 committed by cherif
parent 7bdc5720ce
commit 975921a9a6
1 changed files with 6 additions and 1 deletions

View File

@ -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']