From bad5cbb4d52b89654c294197bae8e8d9ee5f7680 Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Wed, 18 Feb 2026 17:56:47 +0530 Subject: [PATCH 1/2] fix: skip updating on zoom if unrelated fields --- .../doctype/zoom_webinar/zoom_webinar.py | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py b/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py index 1073386..603f992 100644 --- a/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py +++ b/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py @@ -10,7 +10,7 @@ from frappe.integrations.utils import create_request_log from frappe.model.document import Document from frappe.utils import cint, format_datetime -from frappe.utils.data import convert_utc_to_timezone, get_datetime +from frappe.utils.data import convert_utc_to_timezone, get_datetime, get_time from zoom_integration.utils import ZOOM_API_BASE_PATH, get_authenticated_headers_for_zoom @@ -101,6 +101,27 @@ def update_webinar_on_zoom_if_applicable(self): if self.flags.in_import or self.flags.in_migration: return # Skip updates during import or migration + if self.is_new(): + return + + before_save = self.get_doc_before_save() + + current_start = get_time(self.get("start_time")) + previous_start = get_time(before_save.get("start_time")) + current_date = self.get("date") + previous_date = str(before_save.get("date")) + + # breakpoint() + zoom_related_field_not_updated = ( + self.title == before_save.title + and self.agenda == before_save.agenda + and self.duration == before_save.duration + and current_date == previous_date + and current_start == previous_start + ) + if zoom_related_field_not_updated: + return + # For simplicity, we will only update the title and agenda in this example. url = f"{ZOOM_API_BASE_PATH}/webinars/{self.zoom_webinar_id}" headers = get_authenticated_headers_for_zoom() From c52db30ce367447d66eeb6c2962b84b83cee998e Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Wed, 18 Feb 2026 17:59:00 +0530 Subject: [PATCH 2/2] chore: remove breakpoint --- .../zoom_integration/doctype/zoom_webinar/zoom_webinar.py | 1 - 1 file changed, 1 deletion(-) diff --git a/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py b/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py index 603f992..737d656 100644 --- a/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py +++ b/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py @@ -111,7 +111,6 @@ def update_webinar_on_zoom_if_applicable(self): current_date = self.get("date") previous_date = str(before_save.get("date")) - # breakpoint() zoom_related_field_not_updated = ( self.title == before_save.title and self.agenda == before_save.agenda