Spaces:
Sleeping
Sleeping
Update controllers/fetch_microsoft_mails.py
Browse files
controllers/fetch_microsoft_mails.py
CHANGED
@@ -238,7 +238,10 @@ def extract_attachments_from_mail(access_token: str, message_data: dict) -> List
|
|
238 |
attachments_response = requests.get(f'https://graph.microsoft.com/v1.0/me/messages/{message_id}/attachments', headers=headers)
|
239 |
if attachments_response.status_code != 200 :
|
240 |
return "No Attachments","Empty Strcutured Data"
|
|
|
|
|
241 |
attachments = attachments_response.json().get('value', [])
|
|
|
242 |
if attachments:
|
243 |
for attachment in attachments:
|
244 |
attachment_id = attachment['id']
|
|
|
238 |
attachments_response = requests.get(f'https://graph.microsoft.com/v1.0/me/messages/{message_id}/attachments', headers=headers)
|
239 |
if attachments_response.status_code != 200 :
|
240 |
return "No Attachments","Empty Strcutured Data"
|
241 |
+
print("attachments_response")
|
242 |
+
print(attachments_response)
|
243 |
attachments = attachments_response.json().get('value', [])
|
244 |
+
print(attachments)
|
245 |
if attachments:
|
246 |
for attachment in attachments:
|
247 |
attachment_id = attachment['id']
|