Edit_Job_Profile
ahmed.mujtaba 2026-09-15 17:30:59 +05:00
parent 43852e22e0
commit a2932fd1bf
1 changed files with 9 additions and 3 deletions

View File

@ -49,9 +49,15 @@ MAX_JOB_IMAGE_BYTES=5*1024*1024
def _payload_recruiter_ids(payload):
if payload.get("current_recruiter_ids"):
raw=payload.get("current_recruiter_ids")
return raw
"""None = the client did not send recruiters, so leave them alone.
[] = the client sent an empty list, so remove every recruiter.
Checks for the key rather than truthiness: an empty list is falsy, and
reading it as "not sent" made the last recruiter impossible to remove.
"""
if "current_recruiter_ids" not in payload:
return None
return payload.get("current_recruiter_ids") or []
def _recruiter_fields(users):
ids=[str(u.id) for u in users]