Repository: frappe/frappe

Issue:
Create block in workspace
### Information about bug

### App Versions
```
{
	"erpnext": "14.27.2",
	"frappe": "14.39.0",
	"hrms": "14.4.3",
	"india_compliance": "14.10.1",
	"payments": "0.0.1"
}
```
### Route
```
Workspaces/Home
```
### Traceback
```
Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 66, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, 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 1608, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/search.py", line 35, in search_link
    search_widget(
  File "apps/frappe/frappe/desk/search.py", line 106, in search_widget
    raise e
  File "apps/frappe/frappe/desk/search.py", line 83, in search_widget
    frappe.response["values"] = frappe.call(
  File "apps/frappe/frappe/__init__.py", line 1608, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/doctype/custom_html_block/custom_html_block.py", line 18, in get_custom_blocks_for_user
    condition_query = frappe.qb.get_query(customHTMLBlock)
AttributeError: type object 'MariaDB' has no attribute 'get_query'

```
### Request Data
```
{
	"type": "POST",
	"args": {
		"txt": "",
		"doctype": "Custom HTML Block",
		"reference_doctype": "",
		"query": "frappe.desk.doctype.custom_html_block.custom_html_block.get_custom_blocks_for_user"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.search.search_link"
}
```
### Response Data
```
{
	"exception": "AttributeError: type object 'MariaDB' has no attribute 'get_query'"
}
```

### Module

accounts, other

### Version

{
	"erpnext": "14.27.2",
	"frappe": "14.39.0",
	"hrms": "14.4.3",
	"india_compliance": "14.10.1",
	"payments": "0.0.1"
}

### Installation method

FrappeCloud

### Relevant log output / Stack trace / Full Error Message.

_No response_


Discussion:
Having the same problem.. any solution to get this thing solved?
We have same issue
Changing line 18 in custom_html_block.py fixed the issue for me. Change get_query to from_

- condition_query = frappe.qb.get_query(customHTMLBlock)
+ condition_query = frappe.qb.from_(customHTMLBlock)
same issue here on latest update

> 
@cwooldridge 
Thank you, it's working for me
> Changing line 18 in custom_html_block.py fixed the issue for me. Change get_query to from_
> 
> * condition_query = frappe.qb.get_query(customHTMLBlock)
> 
> * condition_query = frappe.qb.from_(customHTMLBlock)

Sir, you're a god. Thank you. I finally have erpnext fully operational with zero bugs or errors. (hopefully) :D

Resolving patch:
diff --git a/frappe/desk/doctype/custom_html_block/custom_html_block.py b/frappe/desk/doctype/custom_html_block/custom_html_block.py
--- a/frappe/desk/doctype/custom_html_block/custom_html_block.py
+++ b/frappe/desk/doctype/custom_html_block/custom_html_block.py
@@ -30,7 +30,7 @@ def get_custom_blocks_for_user(doctype, txt, searchfield, start, page_len, filte
 	# return logged in users private blocks and all public blocks
 	customHTMLBlock = DocType("Custom HTML Block")
 
-	condition_query = frappe.qb.get_query(customHTMLBlock)
+	condition_query = frappe.qb.from_(customHTMLBlock)
 
 	return (
 		condition_query.select(customHTMLBlock.name).where(


Test patch: