Skip to content

Commit

Permalink
fix(test): test case for project query
Browse files Browse the repository at this point in the history
(cherry picked from commit 3349dde)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Jan 16, 2024
1 parent f2e577b commit 98967ed
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 @@ -345,7 +345,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 98967ed

Please sign in to comment.