correction for list issue

This commit is contained in:
2024-06-27 00:48:13 +02:00
parent 9e9d6b666e
commit 459fa7dd2b
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -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()
+2 -2
View File
@@ -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)