diff --git a/api/blueprints/mail/oauth_callback.py b/api/blueprints/mail/oauth_callback.py index 553875a..b840f32 100644 --- a/api/blueprints/mail/oauth_callback.py +++ b/api/blueprints/mail/oauth_callback.py @@ -158,17 +158,17 @@ async def handle_gmail_callback() -> render_template: { "name": "TCAOFF", "textColor": "#434343", - "backgroundColor": "#cccccc" + "backgroundColor": "#e7e7e7" }, { "name": "CA-Doc", "textColor": "#434343", - "backgroundColor": "#cccccc" + "backgroundColor": "#e7e7e7" }, { "name": "CA-AI", "textColor": "#434343", - "backgroundColor": "#cccccc" + "backgroundColor": "#e7e7e7" } ] tasks = [ diff --git a/models/behaviour/mail/sync_v2.py b/models/behaviour/mail/sync_v2.py index 91873bb..8b2d4b1 100644 --- a/models/behaviour/mail/sync_v2.py +++ b/models/behaviour/mail/sync_v2.py @@ -455,12 +455,16 @@ class MailSyncModel(BaseModel): ) # Apply the labels to the read messages: - try: client_response = await mail_client.modify_messages( - tokens = tokens, - message_ids = [v["id"] for v in messages_list], - add_label_ids = [tokens.labels.get("TCAOFF")] - ) - except Exception as exception: self._printer(exception) + try: + client_response = await mail_client.modify_messages( + tokens = tokens, + message_ids = [v["id"] for v in messages_list.values()], + add_label_ids = [tokens.labels.get("TCAOFF", {}).get("id")] + ) + print(client_response) + print([tokens.labels.get("TCAOFF")]) + except Exception as exception: + self._printer(exception) # Done here: sync_results.message = f"{sync_results.successCount}/{sync_results.totalCount} mail(s) sync'd from gmail"