def check_lato_blog_category_parent
      category_parent = LatoBlog::CategoryParent.find_by(id: lato_blog_category_parent_id)
      if !category_parent
        errors.add('Category parent', 'not exist for the category')
        throw :abort
        return
      end

      same_language_category = category_parent.categories.find_by(meta_language: meta_language)
      if same_language_category && same_language_category.id != id
        errors.add('Category parent', 'has another category for the same language')
        throw :abort
        return
      end
    end
def check_lato_blog_category_parent
      category_parent = LatoBlog::CategoryParent.find_by(id: lato_blog_category_parent_id)
      if !category_parent
        errors.add('Category parent', 'not exist for the category')
        throw :abort
        return
      end

      same_language_category = category_parent.categories.find_by(meta_language: meta_language)
      if same_language_category && same_language_category.id != id
        errors.add('Category parent', 'has another category for the same language')
        throw :abort
        return
      end
    end
This function check that the category parent exist and has not others categories for the same language.