diff --git a/huxley/core/admin/registration.py b/huxley/core/admin/registration.py index d6fbb033..fab3b656 100644 --- a/huxley/core/admin/registration.py +++ b/huxley/core/admin/registration.py @@ -23,7 +23,7 @@ def get_rows(self): "Beginners", "Intermediates", "Advanced", "Spanish Speakers", "Chinese Speakers", "Assignments Finalized", "Waivers Complete", "Delegate Fees Paid", "Delegate Fees Owed", - "Paid Registration Fee?", "Invoice Sent", "Payment Type", "Country 1", "Country 2", "Country 3", + "Paid Registration Fee?", "Invoice Sent", "Payment Type", "Waitlisted", "Country 1", "Country 2", "Country 3", "Country 4", "Country 5", "Country 6", "Country 7", "Country 8", "Country 9", "Country 10", "Committee Preferences", "Registration Comments" @@ -42,6 +42,7 @@ def get_rows(self): for cp in registration.committee_preferences.all()) ] payment_type_string = ['Credit Card' if registration.payment_type == 1 else 'Check'] + is_waitlisted_string = ['Yes' if registration.is_waitlisted == 1 else 'No'] rows.append([ str(field) for field in [ @@ -60,8 +61,10 @@ def get_rows(self): registration.invoices_sent ] ] + payment_type_string + - country_preferences + committee_preferences + - [str(registration.registration_comments)]) + is_waitlisted_string + + country_preferences + + committee_preferences + + [str(registration.registration_comments)]) return rows def info(self, request): @@ -79,7 +82,7 @@ def info(self, request): def sheets(self, request): if settings.SHEET_ID: - SHEET_RANGE = 'Registration!A1:AA' + SHEET_RANGE = 'Registration!A1:AB' # Store credentials creds = service_account.Credentials.from_service_account_file( settings.SERVICE_ACCOUNT_FILE, scopes=settings.SCOPES) diff --git a/huxley/core/tests/admin/test_registration.py b/huxley/core/tests/admin/test_registration.py index cdb74e44..a3377ac8 100644 --- a/huxley/core/tests/admin/test_registration.py +++ b/huxley/core/tests/admin/test_registration.py @@ -25,7 +25,7 @@ def test_preference_export(self): "Beginners", "Intermediates", "Advanced", "Spanish Speakers", "Chinese Speakers", "Assignments Finalized", "Waivers Complete", "Delegate Fees Paid", "Delegate Fees Owed", "Paid Registration Fee?", - "Invoice Sent", "Payment Type", + "Invoice Sent", "Payment Type", "Waitlisted", "Country 1", "Country 2", "Country 3", "Country 4", "Country 5", "Country 6", "Country 7", "Country 8", "Country 9", "Country 10", "Committee Preferences", "Registration Comments" @@ -41,6 +41,7 @@ def test_preference_export(self): cp.name for cp in registration.committee_preferences.all())] payment_type_string = ['Credit Card' if registration.payment_type == 1 else 'Check'] + is_waitlisted_string = ['Yes' if registration.is_waitlisted == 1 else 'No'] fields = [ registration.registered_at, @@ -61,6 +62,7 @@ def test_preference_export(self): registration.invoices_sent ] fields.extend(payment_type_string) + fields.extend(is_waitlisted_string) fields.extend(country_preferences) fields.extend(committee_preferences) fields.extend(registration.registration_comments)