Edit_Job_Profile
parent
43852e22e0
commit
a2932fd1bf
|
|
@ -49,9 +49,15 @@ MAX_JOB_IMAGE_BYTES=5*1024*1024
|
||||||
|
|
||||||
|
|
||||||
def _payload_recruiter_ids(payload):
|
def _payload_recruiter_ids(payload):
|
||||||
if payload.get("current_recruiter_ids"):
|
"""None = the client did not send recruiters, so leave them alone.
|
||||||
raw=payload.get("current_recruiter_ids")
|
[] = the client sent an empty list, so remove every recruiter.
|
||||||
return raw
|
|
||||||
|
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):
|
def _recruiter_fields(users):
|
||||||
ids=[str(u.id) for u in users]
|
ids=[str(u.id) for u in users]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue