So I have a list of dictionary, i.e [{item_code: "item 1", qty: 2}]
and as annotation in the method is
import frappe
from pydantic import BaseModel
from typing import List
def Item(BaseModel):
item_code: str
qty: float
@frappe.whitelist()
def test(items: List[Item]):
return "OK"
When I pass the data using frappe.call()
the method throws an error.