fix: add flag for initial email sync (#33006)

* fix: add flag for initial email sync

* fix: rever from_uid calc
This commit is contained in:
RitvikSardana 2025-06-19 18:13:32 +05:30 committed by GitHub
parent 94109de17d
commit 4fbdaf3a9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -219,6 +219,9 @@ class EmailServer:
uidnext = int(self.parse_imap_response("UIDNEXT", message[0]) or "1")
frappe.db.set_value("Email Account", self.settings.email_account, "uidnext", uidnext)
if uid_validity is None:
frappe.flags.initial_sync = True
if not uid_validity or uid_validity != current_uid_validity:
# uidvalidity changed & all email uids are reindexed by server
frappe.db.set_value(