Skip to content

Commit

Permalink
Merge pull request #204 from Teknologforeningen/regemails-fields
Browse files Browse the repository at this point in the history
Regemails dump new fields
  • Loading branch information
djstockma authored Sep 17, 2024
2 parents 090fc21 + 687f71e commit 4e12bdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions teknologr/api/tests_dumps.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def setUp(self):
email='[email protected]',
mother_tongue='Svenska',
birth_date='1999-01-01',
degree_programme='Teknolog',
enrolment_year=2010,
)

def login_user(self):
Expand Down Expand Up @@ -129,6 +131,8 @@ class RegEmails(BaseClass, DumpsTestCases):
'email': '[email protected]',
'language': 'Svenska',
'created_at': f'{today}',
'degree_programme': 'Teknolog',
'enrolment_year': '2010',
}]

class Studentbladet(BaseClass, DumpsTestCases):
Expand Down
2 changes: 2 additions & 0 deletions teknologr/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ def dump_reg_emails(request):
'email': applicant.email,
'language': applicant.mother_tongue,
'created_at': applicant.created_at.strftime('%Y-%m-%d'),
'degree_programme': applicant.degree_programme,
'enrolment_year': str(applicant.enrolment_year),
} for applicant in applicants]

return Response(content, status=200)
Expand Down

0 comments on commit 4e12bdf

Please sign in to comment.