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

Minor changes in the UX and courses automatically fetched upon saving in program enrollment #9264

Merged
merged 1 commit into from
Jun 14, 2017

Conversation

manassolanki
Copy link
Contributor

@@ -46,6 +46,7 @@ frappe.ui.form.on("Program Enrollment", {
}
}
});
frm.events.get_courses(frm);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be inside callback

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a different function from getting the fee schedule. Any advantage in writing inside the callback.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the functions is calling server side functions and executed asynchronously. In get_courses function, you are passing doc to the server, where still fees schedule is not there. Hence, if return of get_courses function comes later, it will overwrite the fees_schedule, which is earlier fetched from the first function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants