erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

General Ledger Filter Value Error

Open MrGiveItAway-TPK opened this issue 1 year ago • 1 comments

Information about bug

In General Ledger Report When Using The Filter Account and filling and account like:

  • 01-2222-333-123-01-00 - Online Test Sales - Deal (Used) - S the following error arises:
    • ValueError: not enough values to unpack (expected 2, got 1)

the issue is only when u type something between () like (test)

Module

accounts

Version

erpnext: 15.12.2 frappe: 15.13.0

Installation method

None

Relevant log output / Stack trace / Full Error Message.

App Versions

{
	"erpnext": "15.12.2",
	"frappe": "15.13.0"
}

Route

query-report/General Ledger

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1682, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/search.py", line 47, in search_link
    results = search_widget(
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/search.py", line 193, in search_widget
    values = frappe.get_list(
  File "apps/frappe/frappe/__init__.py", line 1946, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
  File "apps/frappe/frappe/model/db_query.py", line 192, in execute
    result = self.build_and_run()
  File "apps/frappe/frappe/model/db_query.py", line 207, in build_and_run
    args = self.prepare_args()
  File "apps/frappe/frappe/model/db_query.py", line 251, in prepare_args
    self.apply_fieldlevel_read_permissions()
  File "apps/frappe/frappe/model/db_query.py", line 665, in apply_fieldlevel_read_permissions
    table, column = column.split(".", 1)
ValueError: not enough values to unpack (expected 2, got 1)


Request Data

{
	"type": "GET",
	"args": {
		"doctype": "Account",
		"txt": "dealer (new)",
		"filters": "{\"company\":\"Test\"}"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.search.search_link",
	"request_id": null
}

Response Data

{
	"exception": "ValueError: not enough values to unpack (expected 2, got 1)",
	"exc_type": "ValueError"
}

MrGiveItAway-TPK avatar Feb 13 '24 12:02 MrGiveItAway-TPK

@revant please check this if possible

MrGiveItAway-TPK avatar Feb 13 '24 12:02 MrGiveItAway-TPK

@MrGiveItAway-TPK This is fixed now.

deepeshgarg007 avatar Mar 28 '24 08:03 deepeshgarg007