Error in stock Entry while accessing Item through link field

Hello all,

I am using ERPNext: v6.27.22 and Frappe Framework: v6.27.21

I am getting this error While selecting item through dropdown link field in stock entry

Error:

Traceback (most recent call last):
  File "/home/frappe-bench/apps/frappe/frappe/app.py", line 55, in application
    response = frappe.handler.handle()
  File "/home/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
    execute_cmd(cmd)
  File "/home/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/frappe-bench/apps/frappe/frappe/__init__.py", line 854, in call
    return fn(*args, **newargs)
  File "/home/frappe-bench/apps/frappe/frappe/desk/search.py", line 13, in search_link
    search_widget(doctype, txt, query, searchfield=searchfield, page_len=page_len, filters=filters)
  File "/home/frappe-bench/apps/frappe/frappe/desk/search.py", line 35, in search_widget
    searchfield, start, page_len, filters, as_dict=as_dict)
  File "/home/frappe-bench/apps/frappe/frappe/__init__.py", line 854, in call
    return fn(*args, **newargs)
  File "/home/frappe-bench/apps/erpnext/erpnext/controllers/queries.py", line 187, in item_query
    fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
  File "/home/frappe-bench/apps/erpnext/erpnext/controllers/queries.py", line 25, in get_filters_cond
    query.build_filter_conditions(flt, conditions)
  File "/home/frappe-bench/apps/frappe/frappe/model/db_query.py", line 247, in build_filter_conditions
    conditions.append(self.prepare_filter_condition(f))
  File "/home/frappe-bench/apps/frappe/frappe/model/db_query.py", line 315, in prepare_filter_condition
    if self.ignore_ifnull or not can_be_null:
AttributeError: 'DatabaseQuery' object has no attribute 'ignore_ifnull'

How can I solve this within the same version?

Thanks in Advance

Thanks for saurabh

Just added this line in db_query.py

self.ignore_ifnull = False

and it works.Thanks

1 Like