Fix default work package status destroy

pull/1311/head
Ion Biziiac 11 years ago committed by Hagen Schink
parent 7c222052ba
commit 0236f08c63
  1. 7
      app/controllers/statuses_controller.rb

@ -76,7 +76,12 @@ class StatusesController < ApplicationController
verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed }
def destroy
Status.find(params[:id]).destroy
status = Status.find(params[:id])
if status.is_default?
flash[:error] = l(:error_unable_delete_default_status)
else
status.destroy
end
redirect_to :action => 'index'
rescue
flash[:error] = l(:error_unable_delete_status)

Loading…
Cancel
Save