add operator to siminfo

This commit is contained in:
2022-03-25 09:16:27 +01:00
parent 3c4f6ec88b
commit 99dd077bb2
3 changed files with 13 additions and 7 deletions
+4 -2
View File
@@ -64,7 +64,8 @@ class ModemPool:
contact.ccid.replace("F", "") == ccid.replace("F", "")]
if len(contact) > 0:
phone_number = contact[0].phone
self._db_manager.save_sim_info(SimInfoPojo(phone=str(phone_number), ccid=ccid, position=position))
self._db_manager.save_sim_info(
SimInfoPojo(phone=str(phone_number), ccid=ccid, position=position, operator=operator.value))
else:
error_msg = "slot({}),sim({})".format(slot_position, sim_position)
oracle_log_sender.send_contact_not_found(error_msg)
@@ -89,7 +90,8 @@ class ModemPool:
print("phone is " + phone_number)
if phone_number:
self._db_manager.save_sim_info(SimInfoPojo(phone=phone_number, ccid=ccid, position=position))
self._db_manager.save_sim_info(
SimInfoPojo(phone=phone_number, ccid=ccid, position=position, operator=operator.value))
self._log_sender.send_log(phone_number, source=self.TAG, subject=SUBJECT_SIM_INFO,
type=LOG_APPOINTMENT_SUCCESS)
# write the number to sim card's phonebook