diff --git a/BrainPortal/lib/exception_helpers.rb b/BrainPortal/lib/exception_helpers.rb index 07a7970c8..965c4f89a 100644 --- a/BrainPortal/lib/exception_helpers.rb +++ b/BrainPortal/lib/exception_helpers.rb @@ -65,11 +65,11 @@ def record_not_deleted(exception) format.html { redirect_to default_redirect } format.js { render :partial => "shared/flash_update", :status => 403 } format.xml { render :xml => {:error => exception.message}, :status => 403 } - format.json { render :json => {:error => "The #{exception.model} with id = #{exception.id}} fails to delete", + format.json { render :json => {:error => "The #{exception.model} with id = #{exception.id} fails to delete", :message => CANNOT_DELETE_MSG, :type => "delete failed", :model => exception.model, - :id => expectation.id + :id => exception.id }, :status => 403 } end