aboutsummaryrefslogtreecommitdiff
path: root/jb/managers/thl.py
diff options
context:
space:
mode:
authorstuppie2026-02-27 19:42:28 -0600
committerstuppie2026-02-27 19:42:28 -0600
commit296ddd716fbb9140143ed72382da36d373041eee (patch)
tree6cce7c2515f16b6daec7f1536618683aec752bc7 /jb/managers/thl.py
parenta11d3e562482abe909478f3c8bc1e7225fb095f9 (diff)
downloadamt-jb-296ddd716fbb9140143ed72382da36d373041eee.tar.gz
amt-jb-296ddd716fbb9140143ed72382da36d373041eee.zip
get_user_profile fix
Diffstat (limited to 'jb/managers/thl.py')
-rw-r--r--jb/managers/thl.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/jb/managers/thl.py b/jb/managers/thl.py
index 44b6496..4671837 100644
--- a/jb/managers/thl.py
+++ b/jb/managers/thl.py
@@ -27,7 +27,15 @@ def get_user_profile(amt_worker_id: str) -> UserProfile:
if res.get("detail") == "user not found":
raise ValueError("user not found")
- return UserProfile.model_validate(res["user_profile"])
+ user_profile = res["user_profile"]
+ # todo: these are computed fields, need a UserProfile parser
+ user_profile.pop("email_md5", None)
+ user_profile.pop("email_sha1", None)
+ user_profile.pop("email_sha256", None)
+ # todo: this shouldn't be in here anyways ---v
+ user_profile['user'].pop("id", None)
+
+ return UserProfile.model_validate(user_profile)
def get_user_blocked(amt_worker_id: str) -> bool: