Mercurial > public > sg101
diff gpp/donations/views.py @ 65:9fabeabd89d4
Donations: cleaned up logging. Use settings.DONATIONS_DEBUG to decide how to filter on test_ipn records.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 27 Jun 2009 21:56:56 +0000 |
parents | 5899e308cdb3 |
children | a3b47d0f4df1 |
line wrap: on
line diff
--- a/gpp/donations/views.py Sat Jun 27 21:44:52 2009 +0000 +++ b/gpp/donations/views.py Sat Jun 27 21:56:56 2009 +0000 @@ -138,18 +138,15 @@ logging.warning('IPN: invalid txn_type: %s' % txn_type) return - logging.debug('web_accept') - # Looks like a donation, save it to the database. # Determine which user this came from, if any. # The username is stored in the custom field if the user was logged in when # the donation was made. user = None - if 'custom' in params: + if 'custom' in params and params['custom']: try: user = User.objects.get(username__exact=params['custom']) except User.DoesNotExist: - logging.debug('user does not exist') pass is_anonymous = item_number == settings.DONATIONS_ITEM_ANON_NUM