Skip to content

Commit 5084846

Browse files
Update URL method for counterparty link generation
Changed the URL method from get_absolute_url to get_crm_url to correctly generate the counterparty's link in the admin interface. This ensures that the displayed link directs to the CRM-specific URL of the counterparty.
1 parent 8549a3f commit 5084846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crm/site/requestadmin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def save_related(self, request, form, formsets, change):
278278
def counterparty(self, obj):
279279
counterparty = obj.lead if obj.lead else obj.company
280280
if counterparty:
281-
url = counterparty.get_absolute_url()
281+
url = counterparty.get_crm_url()
282282
return mark_safe(
283283
f'<a href="{url}">{counterparty.full_name}</a>'
284284
)

0 commit comments

Comments
 (0)