prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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_
  
  </issue>
  <code>
  [start of frappe/desk/doctype/custom_html_block/custom_html_block.py]
  1 # Copyright (c) 2023, Frappe Technologies and contributors
  2 # For license information, please see license.txt
  3 
  4 import frappe
  5 from frappe.model.document import Document
  6 from frappe.query_builder.utils import DocType
  7 
  8 
  9 class CustomHTMLBlock(Document):
  10 	# begin: auto-generated types
  11 	# This code is auto-generated. Do not modify anything in this block.
  12 
  13 	from typing import TYPE_CHECKING
  14 
  15 	if TYPE_CHECKING:
  16 		from frappe.core.doctype.has_role.has_role import HasRole
  17 		from frappe.types import DF
  18 
  19 		html: DF.Code | None
  20 		private: DF.Check
  21 		roles: DF.Table[HasRole]
  22 		script: DF.Code | None
  23 		style: DF.Code | None
  24 	# end: auto-generated types
  25 	pass
  26 
  27 
  28 @frappe.whitelist()
  29 def get_custom_blocks_for_user(doctype, txt, searchfield, start, page_len, filters):
  30 	# return logged in users private blocks and all public blocks
  31 	customHTMLBlock = DocType("Custom HTML Block")
  32 
  33 	condition_query = frappe.qb.get_query(customHTMLBlock)
  34 
  35 	return (
  36 		condition_query.select(customHTMLBlock.name).where(
  37 			(customHTMLBlock.private == 0)
  38 			| ((customHTMLBlock.owner == frappe.session.user) & (customHTMLBlock.private == 1))
  39 		)
  40 	).run()
  41
  [end of frappe/desk/doctype/custom_html_block/custom_html_block.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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 @@
   	# 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(
  
verification_info: {"golden_diff": "diff --git a/frappe/desk/doctype/custom_html_block/custom_html_block.py b/frappe/desk/doctype/custom_html_block/custom_html_block.py\n--- a/frappe/desk/doctype/custom_html_block/custom_html_block.py\n+++ b/frappe/desk/doctype/custom_html_block/custom_html_block.py\n@@ -30,7 +30,7 @@\n \t# return logged in users private blocks and all public blocks\n \tcustomHTMLBlock = DocType(\"Custom HTML Block\")\n \n-\tcondition_query = frappe.qb.get_query(customHTMLBlock)\n+\tcondition_query = frappe.qb.from_(customHTMLBlock)\n \n \treturn (\n \t\tcondition_query.select(customHTMLBlock.name).where(\n", "issue": "Create block in workspace\n### Information about bug\n\n### App Versions\r\n```\r\n{\r\n\t\"erpnext\": \"14.27.2\",\r\n\t\"frappe\": \"14.39.0\",\r\n\t\"hrms\": \"14.4.3\",\r\n\t\"india_compliance\": \"14.10.1\",\r\n\t\"payments\": \"0.0.1\"\r\n}\r\n```\r\n### Route\r\n```\r\nWorkspaces/Home\r\n```\r\n### Traceback\r\n```\r\nTraceback (most recent call last):\r\n  File \"apps/frappe/frappe/app.py\", line 66, in application\r\n    response = frappe.api.handle()\r\n  File \"apps/frappe/frappe/api.py\", line 54, in handle\r\n    return frappe.handler.handle()\r\n  File \"apps/frappe/frappe/handler.py\", line 47, in handle\r\n    data = execute_cmd(cmd)\r\n  File \"apps/frappe/frappe/handler.py\", line 85, in execute_cmd\r\n    return frappe.call(method, **frappe.form_dict)\r\n  File \"apps/frappe/frappe/__init__.py\", line 1608, in call\r\n    return fn(*args, **newargs)\r\n  File \"apps/frappe/frappe/desk/search.py\", line 35, in search_link\r\n    search_widget(\r\n  File \"apps/frappe/frappe/desk/search.py\", line 106, in search_widget\r\n    raise e\r\n  File \"apps/frappe/frappe/desk/search.py\", line 83, in search_widget\r\n    frappe.response[\"values\"] = frappe.call(\r\n  File \"apps/frappe/frappe/__init__.py\", line 1608, in call\r\n    return fn(*args, **newargs)\r\n  File \"apps/frappe/frappe/desk/doctype/custom_html_block/custom_html_block.py\", line 18, in get_custom_blocks_for_user\r\n    condition_query = frappe.qb.get_query(customHTMLBlock)\r\nAttributeError: type object 'MariaDB' has no attribute 'get_query'\r\n\r\n```\r\n### Request Data\r\n```\r\n{\r\n\t\"type\": \"POST\",\r\n\t\"args\": {\r\n\t\t\"txt\": \"\",\r\n\t\t\"doctype\": \"Custom HTML Block\",\r\n\t\t\"reference_doctype\": \"\",\r\n\t\t\"query\": \"frappe.desk.doctype.custom_html_block.custom_html_block.get_custom_blocks_for_user\"\r\n\t},\r\n\t\"headers\": {},\r\n\t\"error_handlers\": {},\r\n\t\"url\": \"/api/method/frappe.desk.search.search_link\"\r\n}\r\n```\r\n### Response Data\r\n```\r\n{\r\n\t\"exception\": \"AttributeError: type object 'MariaDB' has no attribute 'get_query'\"\r\n}\r\n```\n\n### Module\n\naccounts, other\n\n### Version\n\n{\r\n\t\"erpnext\": \"14.27.2\",\r\n\t\"frappe\": \"14.39.0\",\r\n\t\"hrms\": \"14.4.3\",\r\n\t\"india_compliance\": \"14.10.1\",\r\n\t\"payments\": \"0.0.1\"\r\n}\n\n### Installation method\n\nFrappeCloud\n\n### Relevant log output / Stack trace / Full Error Message.\n\n_No response_\n", "before_files": [{"content": "# Copyright (c) 2023, Frappe Technologies and contributors\n# For license information, please see license.txt\n\nimport frappe\nfrom frappe.model.document import Document\nfrom frappe.query_builder.utils import DocType\n\n\nclass CustomHTMLBlock(Document):\n\t# begin: auto-generated types\n\t# This code is auto-generated. Do not modify anything in this block.\n\n\tfrom typing import TYPE_CHECKING\n\n\tif TYPE_CHECKING:\n\t\tfrom frappe.core.doctype.has_role.has_role import HasRole\n\t\tfrom frappe.types import DF\n\n\t\thtml: DF.Code | None\n\t\tprivate: DF.Check\n\t\troles: DF.Table[HasRole]\n\t\tscript: DF.Code | None\n\t\tstyle: DF.Code | None\n\t# end: auto-generated types\n\tpass\n\n\n@frappe.whitelist()\ndef get_custom_blocks_for_user(doctype, txt, searchfield, start, page_len, filters):\n\t# return logged in users private blocks and all public blocks\n\tcustomHTMLBlock = DocType(\"Custom HTML Block\")\n\n\tcondition_query = frappe.qb.get_query(customHTMLBlock)\n\n\treturn (\n\t\tcondition_query.select(customHTMLBlock.name).where(\n\t\t\t(customHTMLBlock.private == 0)\n\t\t\t| ((customHTMLBlock.owner == frappe.session.user) & (customHTMLBlock.private == 1))\n\t\t)\n\t).run()\n", "path": "frappe/desk/doctype/custom_html_block/custom_html_block.py"}]}