Skip to content

Commit

Permalink
Fixed bug where saving a data assoc steps operations whose status is …
Browse files Browse the repository at this point in the history
…'planning'
  • Loading branch information
klavins committed Aug 2, 2018
1 parent 16f678e commit f0fed8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/json_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def save
end

if params[:model][:model] == 'DataAssociation' && record.parent_class == 'Plan'
Operation.step(Plan.find(record.parent_id)
.operations
.reject { |op| %w[done error scheduled running].member?(op.status) })
plan = Plan.find(record.parent_id)
Operation.step(plan.operations
.reject { |op| %w[planning done error scheduled running].member?(op.status) })
end

if record.errors.empty?
Expand Down

0 comments on commit f0fed8f

Please sign in to comment.