I try to get all students from a guardian.
I call this endpoint:
{{host}}api/resource/Guardian/EDU-GRD-2023-00001?fields=“*”
The problem is it seems that some of the students object doesn’t return “student_name”
All new student that I relate to this guardian doesn’t show the student_name .
Anyone can give me insight what happen here?
mars
May 7, 2023, 6:43am
3
Yes
The file “guardian.py” is calling frappe.db.getvalue(“Student”, student.parent, “title”)
in education/guardian.py at a3510b98218ad2e88b28db0749742b6ec676cb09 · frappe/education · GitHub
The Student objects do not have a field called title
We can solve this problem by customizing student and add a field called “title”
or
pull request to frappe/education modifying the line of code and change the variable “title” to “student_name”
Working on solution here
frappe:develop
← canlann:patch-1
opened 06:50AM - 07 May 23 UTC
When opening doctype "Guardian" that has "Students" connected to it. "Guardian" … can not be opened because is trying to fetch the field "title" from doctype "Student", which does not exist.
![image](https://user-images.githubusercontent.com/11473213/236662398-652b3926-3b83-42fb-be5a-4278dc2d1c3e.png)
thanks mars, it works now