aboutsummaryrefslogtreecommitdiff
path: root/jb/managers
diff options
context:
space:
mode:
Diffstat (limited to 'jb/managers')
-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: