Render the correct view when updating jobs
We were referencing an old view in `PartiesController#update_job`. This has been corrected.
This commit is contained in:
parent
505176ae5f
commit
02022c4a1c
2 changed files with 6 additions and 5 deletions
|
|
@ -131,6 +131,7 @@ module Api
|
||||||
fields :edit_key
|
fields :edit_key
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Remixed view
|
||||||
view :remixed do
|
view :remixed do
|
||||||
include_view :created
|
include_view :created
|
||||||
include_view :source_party
|
include_view :source_party
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,10 @@ module Api
|
||||||
|
|
||||||
# Remove extra subskills if necessary
|
# Remove extra subskills if necessary
|
||||||
if old_job &&
|
if old_job &&
|
||||||
%w[1 2 3].include?(old_job.row) &&
|
%w[1 2 3].include?(old_job.row) &&
|
||||||
%w[4 5 ex2].include?(job.row) &&
|
%w[4 5 ex2].include?(job.row) &&
|
||||||
@party.skill1 && @party.skill2 && @party.skill3 &&
|
@party.skill1 && @party.skill2 && @party.skill3 &&
|
||||||
@party.skill1.sub && @party.skill2.sub && @party.skill3.sub
|
@party.skill1.sub && @party.skill2.sub && @party.skill3.sub
|
||||||
@party['skill3_id'] = nil
|
@party['skill3_id'] = nil
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -47,7 +47,7 @@ module Api
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
render json: PartyBlueprint.render(@party, view: :jobs) if @party.save!
|
render json: PartyBlueprint.render(@party, view: :job_metadata) if @party.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_job_skills
|
def update_job_skills
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue