fix: eval request duplicate conditions

This commit is contained in:
Jannat Patel
2023-07-31 13:25:12 +05:30
parent d0ac0e4523
commit 13a26321f5
3 changed files with 3 additions and 2612 deletions

View File

@@ -21,7 +21,8 @@ class LMSCertificateRequest(Document):
)
for req in existing_requests:
if req.date == getdate(self.date) or getdate() <= getdate(self.date):
print(req.date, getdate(self.date), getdate())
if req.date == getdate(self.date) or getdate() <= getdate(req.date):
course_title = frappe.db.get_value("LMS Course", req.course, "title")
frappe.throw(
_("You already have an evaluation on {0} at {1} for the course {2}.").format(

View File

@@ -107,7 +107,6 @@ const submit_evaluation_form = (values) => {
frappe.throw(__("Please select a slot"));
}
this.eval_form.hide();
frappe.call({
method: "lms.lms.doctype.lms_certificate_request.lms_certificate_request.create_certificate_request",
args: {
@@ -119,6 +118,7 @@ const submit_evaluation_form = (values) => {
class_name: class_name,
},
callback: (r) => {
this.eval_form.hide();
frappe.show_alert({
message: __("Evaluation scheduled successfully"),
indicator: "green",

2610
yarn.lock

File diff suppressed because it is too large Load Diff