Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiyad authored Feb 14, 2023
1 parent 4278bfe commit 6ae1cc0
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions erpnext/www/shop-by-category/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,13 @@ def get_tabs(categories):

def get_category_records(categories: list):
categorical_data = {}
<<<<<<< HEAD
for category in categories:
if category == "item_group":
categorical_data["item_group"] = frappe.db.sql(
"""
Select
name, parent_item_group, is_group, image, route
from
`tabItem Group`
where
parent_item_group = 'All Item Groups'
and show_in_website = 1
""",
as_dict=1,
=======

for c in categories:
if c == "item_group":
categorical_data["item_group"] = frappe.db.get_all(
"Item Group",
filters={"parent_item_group": "All Item Groups", "show_in_website": 1},
fields=["name", "parent_item_group", "is_group", "image", "route"],
>>>>>>> 0df28c7174 (fix(ecommerce): throw invalid doctype error in shop by category (#33901))
)

continue
Expand All @@ -88,22 +72,10 @@ def get_category_records(categories: list):
if meta.get_field("image"):
fields += ["image"]

<<<<<<< HEAD
categorical_data[category] = frappe.db.sql(
f"""
Select
{",".join(fields)}
from
`tab{doctype}`
""",
as_dict=1,
)
=======
data = frappe.db.get_all(doctype, fields=fields)
categorical_data[c] = data
except BaseException:
frappe.throw(_("DocType {} not found").format(doctype))
continue
>>>>>>> 0df28c7174 (fix(ecommerce): throw invalid doctype error in shop by category (#33901))

return categorical_data

0 comments on commit 6ae1cc0

Please sign in to comment.