From 8b9bd0b0a80b5f8c1c243784e3581a3c8b6e1e94 Mon Sep 17 00:00:00 2001 From: Aakash Singh Date: Mon, 8 Apr 2024 17:18:35 +0530 Subject: [PATCH] Staging release 3 for v24.15.0 (#2060) fix custom user authentication (#2059) --- config/authentication.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/authentication.py b/config/authentication.py index ee86acab94..cfea6116ae 100644 --- a/config/authentication.py +++ b/config/authentication.py @@ -1,4 +1,5 @@ import json +from datetime import datetime import jwt import requests @@ -151,7 +152,7 @@ def get_user(self, validated_token, facility): user_type=User.TYPE_VALUE_MAP["Nurse"], verified=True, asset=asset_obj, - age=10, + date_of_birth=datetime.now().date(), ) asset_user.save() return asset_user @@ -202,7 +203,7 @@ def get_user(self, validated_token): phone_number="917777777777", user_type=User.TYPE_VALUE_MAP["Volunteer"], verified=True, - age=10, + date_of_birth=datetime.now().date(), ) user.save() return user