Skip to content

Commit b96a08b

Browse files
authored
CPS-628 Fix Django Admin link to investment project record on FE (#5795)
* Add /details to FE investment project url
1 parent 0c77cbe commit b96a08b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datahub/investment/project/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def __init__(self, *args, **kwargs):
607607

608608
def get_absolute_url(self):
609609
"""URL to the object in the Data Hub internal front end."""
610-
return get_front_end_url(self)
610+
return f'{get_front_end_url(self)}/details'
611611

612612
def save(self, *args, **kwargs):
613613
"""Updates the stage log after saving.

datahub/investment/project/test/test_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_interaction_get_absolute_url():
4848
"""Test that InvestmentProject.get_absolute_url() returns the correct URL."""
4949
project = InvestmentProjectFactory.build()
5050
assert project.get_absolute_url() == (
51-
f'{settings.DATAHUB_FRONTEND_URL_PREFIXES["investmentproject"]}/{project.pk}'
51+
f'{settings.DATAHUB_FRONTEND_URL_PREFIXES["investmentproject"]}/{project.pk}/details'
5252
)
5353

5454

0 commit comments

Comments
 (0)