Commit ad2c87d7 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

get_adherent_name was removed a long time ago

parent 2655b0cb
......@@ -7,7 +7,7 @@
<div class="panel-body">
{% if adhesion %}
{% if show_adherent %}
<p>Adhérent·e : <a href="{{ adhesion.get_adherent_detail_url }}">{{ adhesion.get_adherent_name }}</a></p>
<p>Adhérent·e : <a href="{{ adhesion.get_adherent_detail_url }}">{{ adhesion }}</a></p>
{% endif %}
<p>Numéro d’adhérent·e : ADT{{ adhesion.id }}</p>
{% if adhesion.membership.get_current_payment %}
......
......@@ -114,7 +114,7 @@ class ViewsTestCase(AdhesionsMixin, TestCase):
self.assertEqual(user.adhesion, adh1)
self.assertTrue(adh1.is_physical())
self.assertFalse(adh1.is_moral())
self.assertEqual(adh1.get_adherent_name(), "first last")
self.assertEqual(str(adh1), "first last")
corp = Corporation.objects.get(social_reason="GoodCorp")
adh2 = Adhesion.objects.get(
adherent_type=ContentType.objects.get_for_model(Corporation),
......@@ -123,7 +123,7 @@ class ViewsTestCase(AdhesionsMixin, TestCase):
self.assertEqual(corp.adhesion, adh2)
self.assertFalse(adh2.is_physical())
self.assertTrue(adh2.is_moral())
self.assertEqual(adh2.get_adherent_name(), "GoodCorp")
self.assertEqual(str(adh2), "GoodCorp")
def test_user_creation(self):
url = reverse("user-add")
......
......@@ -176,7 +176,6 @@ class Command(BaseCommand):
fmt = "{:<8}{:<20}{:<20}{:<20}{:<10}{:<40}"
self.stdout.write(fmt.format("ID", "Type", "Label", "Adhérent", "Actif", "IPs"))
for service in services:
adh = service.adhesion.get_adherent_name()
ips = (
", ".join(
map(lambda a: str(a.resource), service.active_allocations.all())
......@@ -189,7 +188,7 @@ class Command(BaseCommand):
service.pk,
str(service.service_type),
service.label,
adh,
str(service.adhesion),
active,
ips,
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment