File tree 4 files changed +16
-11
lines changed
datahub/interaction/email_processors
4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 3
3
from collections import Counter
4
4
5
5
import icalendar
6
- from django .utils .timezone import make_aware
6
+ from django .utils .timezone import is_naive , make_aware
7
7
8
8
from datahub .company .contact_matching import (
9
9
find_active_contact_by_email_address ,
@@ -236,14 +236,14 @@ def extract_interaction_data_from_email(self):
236
236
secondary_advisers = self ._extract_secondary_advisers (all_recipients , sender )
237
237
contacts = self ._extract_and_validate_contacts (all_recipients )
238
238
top_company = _get_top_company_from_contacts (contacts )
239
-
239
+ date = self . message . date
240
240
return {
241
241
'id' : self .message .message_id ,
242
242
'sender' : sender ,
243
243
'contacts' : contacts ,
244
244
'secondary_advisers' : secondary_advisers ,
245
245
'top_company' : top_company ,
246
- 'date' : make_aware (self . message . date ),
246
+ 'date' : make_aware (date ) if is_naive ( date ) else date ,
247
247
'body' : self .message .body ,
248
248
'subject' : self .message .subject ,
249
249
}
Original file line number Diff line number Diff line change @@ -225,6 +225,8 @@ inflection==0.5.1
225
225
# via -r requirements.in
226
226
iniconfig == 1.1.1
227
227
# via pytest
228
+ ipaddress == 1.0.23
229
+ # via mail-parser
228
230
ipython == 8.30.0
229
231
# via -r requirements-dev.in
230
232
isort == 5.11.4
@@ -239,7 +241,7 @@ jmespath==1.0.1
239
241
# botocore
240
242
kombu == 5.3.7
241
243
# via celery
242
- mail-parser == 3.15.0
244
+ mail-parser == 4.1.2
243
245
# via -r requirements.in
244
246
markupsafe == 2.1.2
245
247
# via
@@ -471,8 +473,8 @@ s3transfer==0.10.0
471
473
# via boto3
472
474
sentry-sdk == 2.19.0
473
475
# via -r requirements.in
474
- simplejson == 3.18.0
475
- # via mail-parser
476
+ simplejson == 3.19.3
477
+ # via -r requirements.in
476
478
six == 1.16.0
477
479
# via
478
480
# asttokens
Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ django-log-formatter-asim==0.0.6
11
11
django-mptt==0.16.0
12
12
django-pglocks==1.0.4
13
13
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
15
15
uritemplate==4.1.1 # required for DRF schema features
16
16
whitenoise==6.8.2
17
17
18
18
chardet==5.2.0
19
19
pyyaml==6.0.2
20
20
python-dateutil==2.9.0.post0
21
+ simplejson==3.19.3 # required for correct decimal number serialization
21
22
22
23
# DBT Platform
23
24
dbt-copilot-python==0.2.2
@@ -35,7 +36,7 @@ notifications-python-client==10.0.0
35
36
statsd==4.0.1
36
37
37
38
# Email
38
- mail-parser==3.15.0
39
+ mail-parser==4.1.2
39
40
icalendar==6.1.0
40
41
41
42
# Slack
Original file line number Diff line number Diff line change @@ -160,13 +160,15 @@ importlib-metadata==6.11.0
160
160
# via opentelemetry-api
161
161
inflection == 0.5.1
162
162
# via -r requirements.in
163
+ ipaddress == 1.0.23
164
+ # via mail-parser
163
165
jmespath == 1.0.1
164
166
# via
165
167
# boto3
166
168
# botocore
167
169
kombu == 5.3.7
168
170
# via celery
169
- mail-parser == 3.15.0
171
+ mail-parser == 4.1.2
170
172
# via -r requirements.in
171
173
markupsafe == 2.1.2
172
174
# via werkzeug
@@ -300,8 +302,8 @@ s3transfer==0.10.0
300
302
# via boto3
301
303
sentry-sdk == 2.19.0
302
304
# via -r requirements.in
303
- simplejson == 3.18.0
304
- # via mail-parser
305
+ simplejson == 3.19.3
306
+ # via -r requirements.in
305
307
six == 1.16.0
306
308
# via
307
309
# django-pglocks
You can’t perform that action at this time.
0 commit comments