fix: Correct field name from 'agent' to 'user' in CRM Telephony Agent creation

- The `CRM Telephony Agent` doctype requires the field `user` (not `agent`) as per its schema (`reqd: 1` + `autoname: field:user`).
- This fixes the `ValidationError: User is required` by using the correct field name when creating a new agent.

(cherry picked from commit 7f4f6ff6518bc6cf795d90ea9c74c48dfe0c8c88)
This commit is contained in:
Meer Uzair 2025-07-27 22:58:43 +05:30 committed by Mergify
parent 1fdc8bbe34
commit 092249a159

View File

@ -35,7 +35,7 @@ def set_default_calling_medium(medium):
frappe.get_doc(
{
"doctype": "CRM Telephony Agent",
"agent": frappe.session.user,
"user": frappe.session.user,
"default_medium": medium,
}
).insert(ignore_permissions=True)