Merge branch 'master' of bitbucket.org:panleicim/appointement_modem_pool
This commit is contained in:
+3
-14
@@ -44,20 +44,9 @@ class DataManager:
|
|||||||
doc_ref = self._db.collection(day)
|
doc_ref = self._db.collection(day)
|
||||||
return doc_ref
|
return doc_ref
|
||||||
|
|
||||||
def save_sim_info(self, simInfoPojo: SimInfoPojo):
|
def save_sim_info(self, sim_info: SimInfoPojo):
|
||||||
doc_ref = self._db.collection(SIM_INFOS).document(simInfoPojo.phone)
|
doc_ref = self._db.collection(SIM_INFOS).document(sim_info.phone)
|
||||||
doc_ref.set(simInfoPojo.to_firestore_dict())
|
doc_ref.set(sim_info.to_firestore_dict())
|
||||||
# contact_found = [contact for contact in self._contact_list if
|
|
||||||
# contact.ccid.replace("F", "") == simInfoPojo.ccid.replace("F", "")]
|
|
||||||
# if len(contact_found) > 0:
|
|
||||||
# # link the phone number with contact
|
|
||||||
# contact = contact_found[0]
|
|
||||||
# phone = simInfoPojo.phone[2:len(simInfoPojo.phone)]
|
|
||||||
# ccid = simInfoPojo.ccid
|
|
||||||
# self._db.collection(CONTACT_COLLECTION_NAME).document(contact.passport).update(
|
|
||||||
# {'phone': phone, 'ccid': ccid})
|
|
||||||
# else:
|
|
||||||
# print("error, contact not found")
|
|
||||||
|
|
||||||
def save(self, result: ReserveResultPojo):
|
def save(self, result: ReserveResultPojo):
|
||||||
if result.type == PublishType.SUCCESS:
|
if result.type == PublishType.SUCCESS:
|
||||||
|
|||||||
Reference in New Issue
Block a user