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

fix: ignore item-less maintenance visit for sr no #30684

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Apr 12, 2022

When the item code isn't present maintenance visit fails with this exception. It's technically harmless, but annoying.


App Versions

{
	"erpnext": "14.0.0-dev",
	"frappe": "14.0.0-dev"
}

Route

Form/Maintenance Visit/MAT-MVS-2022-00002

Trackeback

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 31, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 68, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1259, in call
    return fn(*args, **newargs)
TypeError: get_serial_nos_from_schedule() missing 1 required positional argument: 'item_code'

Request Data

{
	"type": "POST",
	"args": {},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.get_serial_nos_from_schedule"
}

Response Data

{
	"exception": "TypeError: get_serial_nos_from_schedule() missing 1 required positional argument: 'item_code'"
}

@ankush ankush merged commit 60fb71b into frappe:develop Apr 12, 2022
mergify bot pushed a commit that referenced this pull request Apr 12, 2022
ankush added a commit that referenced this pull request Apr 12, 2022
(cherry picked from commit 60fb71b)

Co-authored-by: Ankush Menat <ankush@frappe.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant