can read mails and send appointment request
This commit is contained in:
@@ -87,6 +87,7 @@ class MongoDbManager:
|
||||
collection_to_use = self.db[LINKS_TO_VALIDATE]
|
||||
updated_at = time.strftime("%H:%M:%S", time.localtime())
|
||||
_ip_country = "FR"
|
||||
serial = "requests"
|
||||
# find ip_country info
|
||||
for _contact in _all_contact_list:
|
||||
if _contact.mail == mail_address:
|
||||
@@ -96,6 +97,7 @@ class MongoDbManager:
|
||||
collection_to_use.replace_one(filter={'_id': mail_address, }, replacement={
|
||||
u'url': link,
|
||||
u'email': mail_address,
|
||||
u'serial': serial,
|
||||
u'ip_country': _ip_country,
|
||||
"updated_at": updated_at
|
||||
},
|
||||
@@ -103,6 +105,7 @@ class MongoDbManager:
|
||||
else:
|
||||
collection_to_use.replace_one(filter={'_id': link, }, replacement={
|
||||
u'url': link,
|
||||
u'serial': serial,
|
||||
u'ip_country': _ip_country,
|
||||
"updated_at": updated_at
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user