From 1a2cb8c45e44b6bc693bd23fdbce6f1e69b0ec34 Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Wed, 18 Feb 2026 16:39:37 +0530 Subject: [PATCH] fix: skip updating while import --- .../zoom_integration/doctype/zoom_webinar/zoom_webinar.py | 4 ++++ 1 file changed, 4 insertions(+) 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 7f12b6b..1073386 100644 --- a/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py +++ b/zoom_integration/zoom_integration/doctype/zoom_webinar/zoom_webinar.py @@ -98,6 +98,9 @@ def on_update(self): self.update_webinar_on_zoom_if_applicable() 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 + # 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() @@ -596,6 +599,7 @@ def import_existing_webinar(webinar_id: str): "zoom_link": data.get("join_url"), } ) + webinar.flags.in_import = True # Set flag to skip Zoom API update in on_update webinar.insert(ignore_permissions=True) frappe.msgprint(_("Webinar imported successfully from Zoom.")) else: