Skip to content

Commit

Permalink
Merge pull request #5404 from uktrade/fix/new-hvc-codes
Browse files Browse the repository at this point in the history
Fix hvc codes in Export win dataset.
  • Loading branch information
elcct authored May 8, 2024
2 parents 2908687 + fbbf6e7 commit e1580b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datahub/dataset/export_wins/test/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _assert_win_matches_result(
'date': format_date_or_datetime(win.date),
'description': win.description,
'has_hvo_specialist_involvement': win.has_hvo_specialist_involvement,
'hvc': win.hvc.export_win_id,
'hvc': f'{win.hvc.campaign_id}{win.hvc.financial_year}',
'is_e_exported': win.is_e_exported,
'is_line_manager_confirmed': win.is_line_manager_confirmed,
'is_personally_confirmed': win.is_personally_confirmed,
Expand Down
5 changes: 4 additions & 1 deletion datahub/dataset/export_wins/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ def get_dataset(self):
output_field=BooleanField(),
),
country=F('country__iso_alpha2_code'),
hvc=F('hvc__export_win_id'),
hvc=Concat(
Cast('hvc__campaign_id', CharField()),
Cast('hvc__financial_year', CharField()),
),
user__email=F('adviser__contact_email'),
user__name=Concat(
'adviser__first_name',
Expand Down

0 comments on commit e1580b1

Please sign in to comment.