How to assignment in the case condition?

stage_id = case stage_id do
  "" -> JobStage.get_job_stage(job_opening_id, 1).id
  _ -> stage_id 
end
7 Likes