From 3d5b5f1acb86c33e4e71527b4825be55081bc8f5 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 5 Oct 2024 19:18:44 -0700 Subject: [PATCH] Fix random stuff I broke --- src/paperless_mail/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/paperless_mail/views.py b/src/paperless_mail/views.py index a641aa360..e84e3b8e4 100644 --- a/src/paperless_mail/views.py +++ b/src/paperless_mail/views.py @@ -112,10 +112,10 @@ class OauthCallbackView(GenericAPIView): if scope is not None and "google" in scope: # Google # Gmail setup guide: https://postmansmtp.com/how-to-configure-post-smtp-with-gmailgsuite-using-oauth/ - account_type = MailAccount.AccountType.GMAIL + account_type = MailAccount.MailAccountType.GMAIL imap_server = "imap.gmail.com" defaults = { - "name": f"Gmail OAuth {datetime.now()}", + "name": f"Gmail OAuth {timezone.now()}", "username": "", "imap_security": MailAccount.ImapSecurity.SSL, "imap_port": 993, @@ -129,10 +129,10 @@ class OauthCallbackView(GenericAPIView): elif scope is None: # Outlook # Outlok setup guide: https://medium.com/@manojkumardhakad/python-read-and-send-outlook-mail-using-oauth2-token-and-graph-api-53de606ecfa1 - account_type = MailAccount.AccountType.OUTLOOK + account_type = MailAccount.MailAccountType.OUTLOOK imap_server = "outlook.office365.com" defaults = { - "name": f"Outlook OAuth {datetime.now()}", + "name": f"Outlook OAuth {timezone.now()}", "username": "", "imap_security": MailAccount.ImapSecurity.SSL, "imap_port": 993,