From d49d6382536d16479dd96ae29aa9a3398b216dc7 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 25 Nov 2024 14:36:32 +0530 Subject: [PATCH] fix: amount validation for course --- lms/lms/doctype/lms_course/lms_course.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/lms/doctype/lms_course/lms_course.py b/lms/lms/doctype/lms_course/lms_course.py index e3e54a40..c66e456d 100644 --- a/lms/lms/doctype/lms_course/lms_course.py +++ b/lms/lms/doctype/lms_course/lms_course.py @@ -53,7 +53,7 @@ class LMSCourse(Document): frappe.throw(_("Please install the Payments app to create a paid courses.")) def validate_amount_and_currency(self): - if self.paid_course and (not self.amount and not self.currency): + if self.paid_course and (not self.course_price and not self.currency): frappe.throw(_("Amount and currency are required for paid courses.")) def on_update(self):