From 8dd559b9e53ef10c096124ae4d4c450421f3a7c1 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Fri, 13 Sep 2019 16:07:31 +0530 Subject: [PATCH] Update frappe/integrations/doctype/google_contacts/google_contacts.py Co-Authored-By: Faris Ansari --- frappe/integrations/doctype/google_contacts/google_contacts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/integrations/doctype/google_contacts/google_contacts.py b/frappe/integrations/doctype/google_contacts/google_contacts.py index 596c4b64ff..738c097f63 100644 --- a/frappe/integrations/doctype/google_contacts/google_contacts.py +++ b/frappe/integrations/doctype/google_contacts/google_contacts.py @@ -231,7 +231,7 @@ def update_contacts_to_google_contacts(doc, method=None): """ # Workaround to avoid triggering updation when Event is being inserted since # creation and modified are same when inserting doc - if not frappe.db.exists("Google Contacts", {"name": doc.google_contacts}) or doc.modified == doc.creation \ + if not frappe.db.exists("Google Contacts", {"name": doc.google_contacts}) or doc.is_new() \ or not doc.sync_with_google_contacts: return