We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description of issue:
Site: insights.test Form Dict: {'doctype': 'Insights Query', 'fields': ['name', 'title', 'status', 'is_assisted_query', 'is_native_query', 'is_script_query', 'is_stored', 'data_source', 'creation', 'owner', 'owner_name', 'owner_image', 'chart_type'], 'filters': {}, 'order_by': 'creation desc', 'start': 0, 'limit': 50, 'limit_start': 0, 'limit_page_length': 50, 'debug': 0, 'cmd': 'insights.api.queries.get_queries'} Traceback (most recent call last): File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/app.py", line 110, in application response = frappe.api.handle(request) File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/api/__init__.py", line 49, in handle data = endpoint(**arguments) File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call return frappe.handler.handle() File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 49, in handle data = execute_cmd(cmd) File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 85, in execute_cmd return frappe.call(method, **frappe.form_dict) File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1803, in call return fn(*args, **newargs) File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper return func(*args, **kwargs) File "/home/karan/frappe/frappe-bench/apps/insights/insights/decorators.py", line 15, in wrapper return function(*args, **kwargs) File "/home/karan/frappe/frappe-bench/apps/insights/insights/api/queries.py", line 21, in get_queries return ( File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/query_builder/utils.py", line 84, in execute_query result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/database/postgres/database.py", line 220, in sql return super().sql(modify_query(query), modify_values(values), *args, **kwargs) File "/home/karan/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 237, in sql self._cursor.execute(query, values) psycopg2.errors.GroupingError: column "tabUser.full_name" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...hts Query"."creation","tabInsights Query"."owner","tabUser"...
Here,
insights/insights/api/queries.py
Line 45 in 7950b5a
the issue is happening while grouping it. It got resolved by placing
User.full_name.as_("owner_name"), User.user_image.as_("owner_image"), QueryChart.chart_type, DataSource.title.as_("data_source_title"),
in group by.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description of issue:
Here,
insights/insights/api/queries.py
Line 45 in 7950b5a
the issue is happening while grouping it. It got resolved by placing
in group by.
The text was updated successfully, but these errors were encountered: