correction for list issue
This commit is contained in:
@@ -22,7 +22,7 @@ EMAIL_LIST = "EMAIL_LIST"
|
|||||||
DESTINATION_EMAIL_LIST = "DESTINATION_EMAIL_LIST"
|
DESTINATION_EMAIL_LIST = "DESTINATION_EMAIL_LIST"
|
||||||
LINKS_TO_VALIDATE = "LINKS_TO_VALIDATE"
|
LINKS_TO_VALIDATE = "LINKS_TO_VALIDATE"
|
||||||
INVALID_EMAIL_LIST = "INVALID_EMAIL_LIST"
|
INVALID_EMAIL_LIST = "INVALID_EMAIL_LIST"
|
||||||
ADRESSE_LIST ="address"
|
ADRESSE_LIST = "address"
|
||||||
|
|
||||||
|
|
||||||
class MongoDbManager:
|
class MongoDbManager:
|
||||||
@@ -96,6 +96,7 @@ class MongoDbManager:
|
|||||||
except Exception as error:
|
except Exception as error:
|
||||||
self.logger.info(error)
|
self.logger.info(error)
|
||||||
return appointment_list_contacts
|
return appointment_list_contacts
|
||||||
|
|
||||||
def get_all_address_list(self) -> list:
|
def get_all_address_list(self) -> list:
|
||||||
collection_name = ADRESSE_LIST
|
collection_name = ADRESSE_LIST
|
||||||
_address_list = []
|
_address_list = []
|
||||||
@@ -329,6 +330,9 @@ class MongoDbManager:
|
|||||||
},
|
},
|
||||||
upsert=True)
|
upsert=True)
|
||||||
|
|
||||||
|
def list_collection_names(self):
|
||||||
|
return self.db.list_collection_names()
|
||||||
|
|
||||||
|
|
||||||
MONGO_STORE_MANAGER = MongoDbManager()
|
MONGO_STORE_MANAGER = MongoDbManager()
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ def get_all_not_used_mails():
|
|||||||
not_used_emails = []
|
not_used_emails = []
|
||||||
for mail_item in all_emails:
|
for mail_item in all_emails:
|
||||||
if need_to_check_mail(mail_item.mail):
|
if need_to_check_mail(mail_item.mail):
|
||||||
_need_to_add = False
|
_need_to_add = True
|
||||||
for valid_contact in all_valid_contact_list:
|
for valid_contact in all_valid_contact_list:
|
||||||
if valid_contact.mail == mail_item.mail:
|
if valid_contact.mail == mail_item.mail:
|
||||||
_need_to_add = True
|
_need_to_add = False
|
||||||
break
|
break
|
||||||
if _need_to_add:
|
if _need_to_add:
|
||||||
not_used_emails.append(mail_item)
|
not_used_emails.append(mail_item)
|
||||||
|
|||||||
Reference in New Issue
Block a user