Don't render ok in bulk#delete if clean up is required

pull/1263/head
Till Breuer 11 years ago
parent 37a39d712c
commit adeb2e4a27
  1. 2
      app/controllers/work_packages/bulk_controller.rb

@ -77,7 +77,7 @@ class WorkPackages::BulkController < ApplicationController
format.html { render :locals => { work_packages: @work_packages,
associated: WorkPackage.associated_classes_to_address_before_destruction_of(@work_packages) }
}
format.json { head :ok } # TODO find a solution here if called via AJAX
format.json { render json: { error_message: 'Clean up of associated objects required'}, status: 420 }
end
else

Loading…
Cancel
Save