Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "tabLMS Enrollment"."progress" ilike '%%100%%' #687

Open
TGTGamer opened this issue Nov 24, 2023 · 1 comment
Open

Error: "tabLMS Enrollment"."progress" ilike '%%100%%' #687

TGTGamer opened this issue Nov 24, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@TGTGamer
Copy link

Describe the bug
Database query error

To Reproduce
Install LMS using get-app lms and install-app lms

Expected behavior
No error

App Versions

{
	"control_centre": "0.0.1",
	"discord_integration": "0.0.1",
	"erpnext": "15.2.0",
	"fleet_management": "0.0.1",
	"frappe": "15.1.0",
	"gaming": "0.0.1",
	"grand_theft_auto": "0.0.1",
	"healthcare": "15.0.0-dev",
	"incident_management": "0.0.1",
	"justice": "0.0.1",
	"lending": "0.0.1",
	"lms": "1.0.0",
	"payments": "0.0.1",
	"segment_connect": "0.0.1",
	"teamspeak_integration": "0.0.1",
	"vetting": "0.0.1"
}

Route

Workspaces/LMS

Traceback

Error in query:
operator does not exist: numeric ~~* unknown
LINE 3:    where "tabLMS Enrollment"."progress" ilike '%%100%%'
                                                ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

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 1683, 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/__init__.py", line 848, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/desk/reportview.py", line 58, in get_count
    data = execute(**args)[0].get("total_count")
           ^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/desk/reportview.py", line 64, in execute
    return DatabaseQuery(doctype).execute(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/db_query.py", line 200, in execute
    result = self.build_and_run()
             ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/db_query.py", line 240, in build_and_run
    return frappe.db.sql(
           ^^^^^^^^^^^^^^
  File "apps/frappe/frappe/database/postgres/database.py", line 203, in sql
    return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/database/database.py", line 217, in sql
    self._cursor.execute(query, values)
psycopg2.errors.UndefinedFunction: operator does not exist: numeric ~~* unknown
LINE 3:    where "tabLMS Enrollment"."progress" ilike '%%100%%'
                                                ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.


Request Data

{
	"type": "POST",
	"args": {
		"doctype": "LMS Enrollment",
		"filters": "{\"progress\":[\"like\",\"%100%\"]}",
		"fields": "[]",
		"distinct": false
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.reportview.get_count",
	"request_id": null
}

Response Data

{
	"exception": "",
	"exc_type": "UndefinedFunction"
}
@TGTGamer TGTGamer added the bug Something isn't working label Nov 24, 2023
@pateljannat
Copy link
Collaborator

@TGTGamer I am unable to replicate this. Please share the steps to replicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants