Edit_Job_Profile
parent
43852e22e0
commit
a2932fd1bf
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue