Skip to content

Commit dfc6a54

Browse files
Merge pull request #5801 from uktrade/dependabot/pip/mail-parser-4.1.2
Bump mail-parser from 3.15.0 to 4.1.2
2 parents 2e7f888 + a140ca6 commit dfc6a54

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

datahub/interaction/email_processors/parsers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from collections import Counter
44

55
import icalendar
6-
from django.utils.timezone import make_aware
6+
from django.utils.timezone import is_naive, make_aware
77

88
from datahub.company.contact_matching import (
99
find_active_contact_by_email_address,
@@ -236,14 +236,14 @@ def extract_interaction_data_from_email(self):
236236
secondary_advisers = self._extract_secondary_advisers(all_recipients, sender)
237237
contacts = self._extract_and_validate_contacts(all_recipients)
238238
top_company = _get_top_company_from_contacts(contacts)
239-
239+
date = self.message.date
240240
return {
241241
'id': self.message.message_id,
242242
'sender': sender,
243243
'contacts': contacts,
244244
'secondary_advisers': secondary_advisers,
245245
'top_company': top_company,
246-
'date': make_aware(self.message.date),
246+
'date': make_aware(date) if is_naive(date) else date,
247247
'body': self.message.body,
248248
'subject': self.message.subject,
249249
}

requirements-dev.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ inflection==0.5.1
225225
# via -r requirements.in
226226
iniconfig==1.1.1
227227
# via pytest
228+
ipaddress==1.0.23
229+
# via mail-parser
228230
ipython==8.30.0
229231
# via -r requirements-dev.in
230232
isort==5.11.4
@@ -239,7 +241,7 @@ jmespath==1.0.1
239241
# botocore
240242
kombu==5.3.7
241243
# via celery
242-
mail-parser==3.15.0
244+
mail-parser==4.1.2
243245
# via -r requirements.in
244246
markupsafe==2.1.2
245247
# via
@@ -471,8 +473,8 @@ s3transfer==0.10.0
471473
# via boto3
472474
sentry-sdk==2.19.0
473475
# via -r requirements.in
474-
simplejson==3.18.0
475-
# via mail-parser
476+
simplejson==3.19.3
477+
# via -r requirements.in
476478
six==1.16.0
477479
# via
478480
# asttokens

requirements.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ django-log-formatter-asim==0.0.6
1111
django-mptt==0.16.0
1212
django-pglocks==1.0.4
1313
django-reversion==5.1.0
14-
inflection==0.5.1 # required for DRF shcema features
14+
inflection==0.5.1 # required for DRF schema features
1515
uritemplate==4.1.1 # required for DRF schema features
1616
whitenoise==6.8.2
1717

1818
chardet==5.2.0
1919
pyyaml==6.0.2
2020
python-dateutil==2.9.0.post0
21+
simplejson==3.19.3 # required for correct decimal number serialization
2122

2223
# DBT Platform
2324
dbt-copilot-python==0.2.2
@@ -35,7 +36,7 @@ notifications-python-client==10.0.0
3536
statsd==4.0.1
3637

3738
# Email
38-
mail-parser==3.15.0
39+
mail-parser==4.1.2
3940
icalendar==6.1.0
4041

4142
# Slack

requirements.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,15 @@ importlib-metadata==6.11.0
160160
# via opentelemetry-api
161161
inflection==0.5.1
162162
# via -r requirements.in
163+
ipaddress==1.0.23
164+
# via mail-parser
163165
jmespath==1.0.1
164166
# via
165167
# boto3
166168
# botocore
167169
kombu==5.3.7
168170
# via celery
169-
mail-parser==3.15.0
171+
mail-parser==4.1.2
170172
# via -r requirements.in
171173
markupsafe==2.1.2
172174
# via werkzeug
@@ -300,8 +302,8 @@ s3transfer==0.10.0
300302
# via boto3
301303
sentry-sdk==2.19.0
302304
# via -r requirements.in
303-
simplejson==3.18.0
304-
# via mail-parser
305+
simplejson==3.19.3
306+
# via -r requirements.in
305307
six==1.16.0
306308
# via
307309
# django-pglocks

0 commit comments

Comments
 (0)