Skip to content

Commit bc92228

Browse files
committed
Refactor proof_of_life_document method to use list
1 parent 0d3929c commit bc92228

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

mati/resources/verifications.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ def proof_of_residency_document(self) -> Optional[VerificationDocument]:
8282
def proof_of_life_document(self) -> Optional[Liveness]:
8383
if not self.steps:
8484
return None
85-
pol = [
86-
pol
87-
for pol in self.steps
88-
if (pol.id == 'liveness' or pol.id == 'selfie')
89-
]
85+
pol = [pol for pol in self.steps if pol.id in ['liveness', 'selfie']]
9086
return pol[-1] if pol else None
9187

9288
@property
@@ -101,7 +97,7 @@ def proof_of_life_errors(self) -> List[Errors]:
10197
else None,
10298
)
10399
for pol in self.steps # type: ignore
104-
if pol.id == 'liveness' and pol.error
100+
if pol.id in ['liveness', 'selfie'] and pol.error
105101
]
106102

107103
@property

mati/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.8'
1+
__version__ = '2.0.8.dev2'

0 commit comments

Comments
 (0)