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

Asset - After Submission of Asset Maintenance showing error #97

Closed
rushabhmaywade opened this issue Sep 30, 2024 · 1 comment · Fixed by #138
Closed

Asset - After Submission of Asset Maintenance showing error #97

rushabhmaywade opened this issue Sep 30, 2024 · 1 comment · Fixed by #138
Assignees
Labels
Asset Maintenance bug Something isn't working

Comments

@rushabhmaywade
Copy link
Collaborator

Information about bug

image

Module

assets

Version

ERPNext: v15.34.0 (pre-prod)

Frappe Framework: v15.41.0 (pre-prod)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"erpnext": "15.34.0",
	"frappe": "15.41.0",
	"payments": "0.0.1"
}

Route

Form/Asset Maintenance/ACC-ASS-2024-00002

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 1775, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/erpnext/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py", line 174, in get_maintenance_log
    return frappe.db.sql(
  File "apps/frappe/frappe/database/postgres/database.py", line 218, in sql
    return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
  File "apps/frappe/frappe/database/database.py", line 227, in sql
    self._cursor.execute(query, values)
psycopg2.errors.GroupingError: column "tabAsset Maintenance Log.asset_name" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...t maintenance_status, count(asset_name) as count, asset_name
                                                             ^


Request Data

{
	"type": "POST",
	"args": {
		"asset_name": "ACC-ASS-2024-00001"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/erpnext.assets.doctype.asset_maintenance.asset_maintenance.get_maintenance_log",
	"request_id": null
}

Response Data

{
	"exception": "",
	"exc_type": "GroupingError",
	"_exc_source": "erpnext (app)",
	"_debug_messages": "[\"Error in query:\\ncolumn \\\"tabAsset Maintenance Log.asset_name\\\" must appear in the GROUP BY clause or be used in an aggregate function\\nLINE 1: ...t maintenance_status, count(asset_name) as count, asset_name\\n                                                             ^\\n\"]"
}
@aasif-patel
Copy link
Collaborator

Resolved hence closing...

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Asset Maintenance bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants