diff options
author | Madhusudan.C.S | 2010-12-09 19:11:15 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2010-12-09 19:11:15 +0530 |
commit | 97bf033d639600f2a69573c45ffd891535fe3f5d (patch) | |
tree | f9d9e9d3bb9e3d3b56b883e7e12a4c55017f93d8 | |
parent | 4116f4fbd97f29da90482f2a008fad227bbdb6e8 (diff) | |
download | scipycon-97bf033d639600f2a69573c45ffd891535fe3f5d.tar.gz scipycon-97bf033d639600f2a69573c45ffd891535fe3f5d.tar.bz2 scipycon-97bf033d639600f2a69573c45ffd891535fe3f5d.zip |
Create payment and wifi objects if they don't exist.
-rw-r--r-- | project/scipycon/registration/views.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/project/scipycon/registration/views.py b/project/scipycon/registration/views.py index 75925d9..505f14a 100644 --- a/project/scipycon/registration/views.py +++ b/project/scipycon/registration/views.py @@ -378,12 +378,13 @@ def regstats_download(request, scope): row = [] row.append(reg.registrant.get_full_name()) row.append(reg.city) - row.append('Yes' if reg.registrant.payment_set.get().confirmed - else 'No') + payment, create = reg.registrant.payment_set.get_or_create() + row.append('Yes' if payment.confirmed else 'No') row.append('Yes' if reg.conference else 'No') row.append('Yes' if reg.tutorial else 'No') row.append('Yes' if reg.sprint else 'No') - row.append(reg.registrant.wifi_set.get().registration_id) + wifi, create = reg.registrant.wifi_set.get_or_create() + row.append(wifi.registration_id) row.append('Yes' if reg.registrant.payment_set.get().acco_confirmed else 'No') acco, created = reg.registrant.accommodation_set.get_or_create() |