mirror of
https://github.com/frappe/lms.git
synced 2026-04-19 22:52:29 +03:00
Merge pull request #2141 from pateljannat/issues-200
fix: if certificate is linked to a batch then don't validate course enrollment
This commit is contained in:
@@ -57,8 +57,10 @@ class LMSCertificate(Document):
|
||||
|
||||
def validate_criteria(self):
|
||||
self.validate_role_of_owner()
|
||||
self.validate_batch_enrollment()
|
||||
self.validate_course_enrollment()
|
||||
if self.batch_name:
|
||||
self.validate_batch_enrollment()
|
||||
elif self.course:
|
||||
self.validate_course_enrollment()
|
||||
|
||||
def validate_role_of_owner(self):
|
||||
roles = frappe.get_roles()
|
||||
|
||||
Reference in New Issue
Block a user