Skip to content

Commit c502dbe

Browse files
committed
SDK-509: Clarified age condition comment in example projects
1 parent 73a1046 commit c502dbe

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ client = Client(YOTI_CLIENT_SDK_ID, YOTI_KEY_FILE_PATH)
120120
activity_details = client.get_activity_details(token)
121121

122122
profile = activity_details.profile
123-
user_profile = activity_details.user_profile #deprecated
124123

125124
selfie = profile.selfie.value
126125
given_names = profile.given_names.value

examples/yoti_example_django/yoti_example/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def get(self, request, *args, **kwargs):
3131
context['base64_selfie_uri'] = getattr(activity_details, 'base64_selfie_uri')
3232
context['user_id'] = getattr(activity_details, 'user_id')
3333

34-
age_verified = profile.get_attribute('age_over:18') # age condition defined in dashboard
34+
# change this string according to the age condition defined in dashboard
35+
age_verified = profile.get_attribute('age_over:18')
3536
if age_verified is not None:
3637
context['age_verified'] = age_verified
3738

examples/yoti_example_flask/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def auth():
4242
context['base64_selfie_uri'] = getattr(activity_details, 'base64_selfie_uri')
4343
context['user_id'] = getattr(activity_details, 'user_id')
4444

45-
age_verified = profile.get_attribute('age_over:18') # age condition defined in dashboard
45+
# change this string according to the age condition defined in dashboard
46+
age_verified = profile.get_attribute('age_over:18')
4647
if age_verified is not None:
4748
context['age_verified'] = age_verified
4849

examples/yoti_example_flask/templates/profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ <h3>Yoti Profile</h3>
212212
</td>
213213
</tr>
214214
{% endif %}
215-
{% if age_verified is defined%}
215+
{% if age_verified is defined %}
216216
<tr>
217217
<th scope="row">Age verified</th>
218218
<td>{{ age_verified.value }}</td>

0 commit comments

Comments
 (0)