diff --git a/db/DbManager.py b/db/DbManager.py index 7c6d16c..0ad66ff 100644 --- a/db/DbManager.py +++ b/db/DbManager.py @@ -62,8 +62,9 @@ class DataManager: doc_ref = self._db.collection(document_name).document(result.id) doc_ref.set(result.to_firestore_dict()) else: - doc_ref = self._db.collection(ERROR_COLLECTION_NAME).document(result.phone) - doc_ref.set(result.to_firestore_dict()) + if len(result.phone) > 0: + doc_ref = self._db.collection(ERROR_COLLECTION_NAME).document(result.phone) + doc_ref.set(result.to_firestore_dict()) def save_timeout_contact(self, contact: ContactPojo): doc_ref = self._db.collection(TIMEOUT).document(str(contact.phone))