diff options
author | lizconlan <liz@mysociety.org> | 2014-08-05 19:40:37 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-09-22 12:39:04 +0100 |
commit | f9977d2d38ad6ddb1d6c897ebc4b9c9c0355dc89 (patch) | |
tree | e6b6689e5f50e7344a01022dba3107ccf774381c /app/controllers | |
parent | 7df6456d69d71e6dba34fbc0d7b3d262d2dc0d38 (diff) |
Allow deletion of public body categories with associatied bodies
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin_public_body_category_controller.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/app/controllers/admin_public_body_category_controller.rb b/app/controllers/admin_public_body_category_controller.rb index f814763ad..e22c5c572 100644 --- a/app/controllers/admin_public_body_category_controller.rb +++ b/app/controllers/admin_public_body_category_controller.rb @@ -71,13 +71,6 @@ class AdminPublicBodyCategoryController < AdminController @locale = self.locale_from_params I18n.with_locale(@locale) do category = PublicBodyCategory.find(params[:id]) - - if PublicBody.find_by_tag(category.category_tag).count > 0 - flash[:notice] = "There are authorities associated with this category, so can't destroy it" - redirect_to admin_category_edit_url(category) - return - end - category.destroy flash[:notice] = "Category was successfully destroyed." redirect_to admin_category_index_url |