Skip to content

Commit

Permalink
Merge pull request #3244 from webkom/fix-companyInterest-csv-export
Browse files Browse the repository at this point in the history
Validate company company name at csv export
  • Loading branch information
Arashfa0301 committed Mar 14, 2023
2 parents cb02392 + ba11777 commit ba01477
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lego/apps/companies/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ def csv(self, *args, **kwargs):
]
)
for companyInterest in companyInterests:
company_name = (
companyInterest.company.name
if companyInterest.company
else companyInterest.company_name
)
participant_range_start = companyInterest.participant_range_start
participant_range_end = companyInterest.participant_range_end
semesters = ", ".join(
Expand Down Expand Up @@ -260,7 +265,7 @@ def csv(self, *args, **kwargs):
)
writer.writerow(
[
companyInterest.company_name,
company_name,
companyInterest.contact_person,
companyInterest.mail,
companyInterest.phone,
Expand Down

0 comments on commit ba01477

Please sign in to comment.