Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from lalithkota/17.0-develop
Browse files Browse the repository at this point in the history
G2P_Auth: Partner field mapping: Fixed empty pairs problem
  • Loading branch information
shibu-narayanan authored Apr 4, 2024
2 parents 9d12995 + 6a6afa3 commit f94fd47
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions g2p_auth_id_oidc/models/g2p_auth_id_oidc_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class G2PAuthIDOidcProvider(models.Model):
"birthdate:birthdate "
"gender:gender "
"address:address "
"picture:picture "
"picture:picture"
),
)
partner_creation_date_format = fields.Char(
Expand All @@ -41,6 +41,7 @@ def map_validation_response_partner_creation(self, req):
res = {}
if self.partner_creation_validate_response_mapping:
for pair in self.partner_creation_validate_response_mapping.split(" "):
from_key, to_key = (k.strip() for k in pair.split(":", 1))
res[to_key] = req.get(from_key, "")
if pair:
from_key, to_key = (k.strip() for k in pair.split(":", 1))
res[to_key] = req.get(from_key, "")
return res

0 comments on commit f94fd47

Please sign in to comment.