def _check_relation_exist(t_id, p_id): theme = Theme.get_or_404(id=t_id, e=ThemeNotFound) product = Product.get_or_404(id=p_id, e=ProductNotFound) return theme, product
def get_theme_detail(id): theme_detail = Theme.get_or_404(id=id, e=ThemeException) return theme_detail.append('products')