Skip to content

Commit 3952635

Browse files
authoredDec 12, 2024··
Map null values to empty strings for company_website (#5853)
This fixes an issue where incoming data had null values, which weren't being mapped. This caused the RQ job to error due to violating the database field not null constraint for `EYBLead.company_website`.
1 parent 35cd2ab commit 3952635

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎datahub/investment_lead/serializers.py

+1
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ def get_related_fields_internal_value(self, data):
418418
'addressLine2': 'address_2',
419419
'county': 'address_county',
420420
'postcode': 'address_postcode',
421+
'companyWebsite': 'company_website',
421422
'role': 'role',
422423
'telphoneNumber': 'telephone_number',
423424
'landingTimeframe': 'landing_timeframe',

‎datahub/investment_lead/test/test_serializers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_non_required_fields_when_value_is_null_or_empty(self, eyb_lead_triage_d
152152
'intentOther': value,
153153
'location': value,
154154
'locationCity': value,
155-
'locationvalue': value,
155+
'locationNone': value,
156156
'hiring': value,
157157
'spend': value,
158158
'spendOther': value,
@@ -272,6 +272,7 @@ def test_non_required_fields_when_value_is_null_or_empty(self, eyb_lead_user_dat
272272
'addressLine2': value,
273273
'county': value,
274274
'postcode': value,
275+
'companyWebsite': value,
275276
'role': value,
276277
'telephoneNumber': value,
277278
'agreeTerms': value,

0 commit comments

Comments
 (0)
Please sign in to comment.