optimize local db

This commit is contained in:
2022-06-08 21:39:45 +02:00
parent 80d362b174
commit 20c84b2a14
9 changed files with 95 additions and 56 deletions
+8
View File
@@ -1,5 +1,7 @@
from dataclasses import dataclass
from pojo.captcha_error_contact_pojo import ContactInErrorPojo
@dataclass
class ContactPojo:
@@ -35,6 +37,12 @@ class ContactPojo:
return dest
@staticmethod
def get_contact_from_error_contact(errorContact: ContactInErrorPojo):
return ContactPojo(phone_number=errorContact.phone, mail=errorContact.mail, ccid=errorContact.ccid,
last_name=errorContact.last_name, first_name=errorContact.first_name,
position=errorContact.position, passport_number=errorContact.passport)
@staticmethod
def from_firestore_dict(source):
ccid = source['ccid']