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:
parent
1fdc8bbe34
commit
092249a159
@ -35,7 +35,7 @@ def set_default_calling_medium(medium):
|
|||||||
frappe.get_doc(
|
frappe.get_doc(
|
||||||
{
|
{
|
||||||
"doctype": "CRM Telephony Agent",
|
"doctype": "CRM Telephony Agent",
|
||||||
"agent": frappe.session.user,
|
"user": frappe.session.user,
|
||||||
"default_medium": medium,
|
"default_medium": medium,
|
||||||
}
|
}
|
||||||
).insert(ignore_permissions=True)
|
).insert(ignore_permissions=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user