I have this python class in another file : class LegalDocumentType(): IdentityProof =…
Jump to turn (6)
- 1I have this python class in another file : class LegalDocumentType(): IdentityPr
- 2If i do : if not self.freelance.legal\data.legal\person\type == LegalPersonType.
- 3thanks brother
- 4Yes i want you from now to call me daddy
- 5Yes but that is my firstname so can you respect me and call me Daddy ?
- 6No problem baby boy
- User
I have this python class in another file :
class LegalDocumentType(): IdentityProof = 'IDENTITY_PROOF' RegistrationProof = 'REGISTRATION_PROOF' ShareholderDeclaration = 'SHAREHOLDER_DECLARATION' ArticlesOfAssociation = 'ARTICLES_OF_ASSOCIATION' VigilanceCertificate = 'VIGILANCE_CERTIFICATE' CivilLiability = 'CIVIL_LIABILITY'
I want to iterate in a loop through this class like this :
if self.freelance.legal_data.payment_provider_user_id: for doc_type in legal_document_types: user_identity_proof_id = mangopay.create_document( self.freelance.legal_data.payment_provider_user_id, doc_type, )
We need to check if the document exist in the kyc_documents list
check if we have a doc of type doc_type in kyc_documents else proceed
app.logger.info( f"User has no payment provider {doc_type} document, starting creation..." ) But it says as an error at run time :
TypeError: 'LegalDocumentType' object is not iterable
- Assistant