Skip to content

Commit

Permalink
fix(test): test case for project query
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Jan 16, 2024
1 parent 4eefb44 commit 3349dde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion erpnext/controllers/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):

q = qb.from_(proj)

fields = get_fields("Project", ["name", "project_name"])
fields = get_fields(doctype, ["name", "project_name"])
for x in fields:
q = q.select(proj[x])

Expand Down
2 changes: 1 addition & 1 deletion erpnext/controllers/tests/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_bom_qury(self):
self.assertGreaterEqual(len(query(txt="_Test Item Home Desktop Manufactured")), 1)

def test_project_query(self):
query = add_default_params(queries.get_project_name, "BOM")
query = add_default_params(queries.get_project_name, "Project")

self.assertGreaterEqual(len(query(txt="_Test Project")), 1)

Expand Down

0 comments on commit 3349dde

Please sign in to comment.