fix: skip conferencing provider validation on batch creation

Frappe sets Select field default to the first option ("Zoom") even
when the field isn't in the creation form. Skip validation for new
batches since conferencing is configured after creation.
This commit is contained in:
Vaibhav Rathore
2026-02-25 16:59:23 +05:30
parent 898a872232
commit 4be47af3ef
+3
View File
@@ -128,6 +128,9 @@ class LMSBatch(Document):
frappe.throw(_("Row #{0} Date cannot be outside the batch duration.").format(schedule.idx))
def validate_conferencing_provider(self):
if self.is_new() or not self.conferencing_provider:
return
if self.conferencing_provider == "Google Meet":
if not self.google_meet_account:
frappe.throw(_("Please select a Google Meet account for this batch."))