Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions conventions/services/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def get_convention_export_excel_header(request):
"Commune",
"Code postal",
"Nom de l'opération",
"Instructeur" if request.user.is_instructeur else "Bailleur",
"Bailleur",
"Type de financement",
"Nombre de logements",
"Nature de l'opération",
Expand All @@ -251,11 +251,7 @@ def get_convention_export_excel_row(request, convention):
convention.programme.ville, # 5. Commune
convention.programme.code_postal, # 6. Code postal
convention.programme.nom, # 7. Nom de l'opération
(
convention.programme.administration.nom
if request.user.is_instructeur
else convention.programme.bailleur.nom
), # 8. Instructeur or Bailleur
convention.programme.bailleur.nom, # 8. Bailleur
convention.lot.get_financement_display(), # 9. Type de financement
convention.lot.nb_logements, # 10. Nombre de logements
convention.programme.nature_logement, # 11. Nature de l'opération dans programme
Expand Down
4 changes: 2 additions & 2 deletions conventions/tests/services/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_get_convention_export_excel_header():
"Commune",
"Code postal",
"Nom de l'opération",
"Instructeur",
"Bailleur",
"Type de financement",
"Nombre de logements",
"Nature de l'opération",
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_get_convention_export_excel_row():
convention.programme.ville,
convention.programme.code_postal,
convention.programme.nom,
convention.programme.administration.nom,
convention.programme.bailleur.nom,
convention.lot.get_financement_display(),
convention.lot.nb_logements,
convention.programme.nature_logement,
Expand Down