Skip to content

Commit 602bfba

Browse files
committed
SDK-1197: Fix incorrect endpoint in get_dynamic_share_request_url with no_params=True, and key error in age over/under verifications if no key exists
1 parent 80c0fa1 commit 602bfba

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.projectKey = yoti-web-sdk:python
22
sonar.projectName = python-sdk
3-
sonar.projectVersion = 2.9.0
3+
sonar.projectVersion = 2.9.1
44
sonar.exclusions=yoti_python_sdk/tests/**,examples/**
55

66
sonar.python.pylint.reportPath=coverage.out

yoti_python_sdk/endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_aml_request_url(self, no_params=False):
2525

2626
def get_dynamic_share_request_url(self, no_params=False):
2727
if no_params:
28-
return "/qrcodes/app/{appid}".format(appid=self.sdk_id)
28+
return "/qrcodes/apps/{appid}".format(appid=self.sdk_id)
2929

3030
return "/qrcodes/apps/{appid}?nonce={nonce}&timestamp={timestamp}".format(
3131
appid=self.sdk_id, nonce=create_nonce(), timestamp=create_timestamp()

yoti_python_sdk/profile.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,15 @@ def get_age_verifications(self):
167167

168168
def find_age_over_verification(self, age):
169169
self.__find_all_age_verifications()
170-
return self.verifications[config.ATTRIBUTE_AGE_OVER + str(age)]
170+
if config.ATTRIBUTE_AGE_OVER + str(age) in self.verifications:
171+
return self.verifications[config.ATTRIBUTE_AGE_OVER + str(age)]
172+
return None
171173

172174
def find_age_under_verification(self, age):
173175
self.__find_all_age_verifications()
174-
return self.verifications[config.ATTRIBUTE_AGE_UNDER + str(age)]
176+
if (config.ATTRIBUTE_AGE_UNDER + str(age)) in self.verifications:
177+
return self.verifications[config.ATTRIBUTE_AGE_UNDER + str(age)]
178+
return None
175179

176180
def __find_all_age_verifications(self):
177181
if self.verifications is None:

yoti_python_sdk/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = "2.9.0"
2+
__version__ = "2.9.1"

0 commit comments

Comments
 (0)