lms
lms copied to clipboard
Unknown column 'tabLMS Course.grant_certificate_after
Describe the bug Created Course, Chapter, Lesson, Batch on LMS system When creating New LMS Certificate Evaluation and clicking on "Course" field an exception is thrown.
To Reproduce Steps to reproduce the behavior:
- Create Course, chapter, lesson, batch
- Create New LMS Certificate Evaluation
- Exception thrown
- Trace back of exception :
App Versions
{
"education": "15.5.0",
"erpnext": "15.30.0",
"frappe": "15.35.0",
"lms": "2.0.0"
}
Route
Form/LMS Certificate Evaluation/new-lms-certificate-evaluation-upwnivqrqm
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, 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 1768, 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 2032, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/db_query.py", line 191, in execute
result = self.build_and_run()
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/db_query.py", line 232, in build_and_run
return frappe.db.sql(
^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 234, in sql
self._cursor.execute(query, values)
File "env/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "env/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'tabLMS Course.grant_certificate_after' in 'where clause'")
Request Data
{
"type": "POST",
"args": {
"txt": "",
"doctype": "LMS Course",
"ignore_user_permissions": 0,
"reference_doctype": "LMS Certificate Evaluation",
"page_length": 10,
"filters": "{\"enable_certification\":true,\"grant_certificate_after\":\"Evaluation\"}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.search.search_link",
"request_id": null
}
Response Data
{
"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'tabLMS Course.grant_certificate_after' in 'where clause'\")",
"exc_type": "OperationalError"
}
Expected behavior No exception
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Ubuntu 23.10 Broswer Firefoz
Smartphone (please complete the following information): None
Additional context None