Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 24, 2012
Jonathan Moss start_date and end_date are nullable fields so we cannot guarantee we…
… have them.
974f86a
Commits on Oct 30, 2012
Jonathan Moss Merge pull request #2 from a-musing-moose/account_dict_error
Account dict error
6ecb2fe
Showing with 10 additions and 3 deletions.
  1. +10 −3 accounts/abstract_models.py
View
13 accounts/abstract_models.py
@@ -206,16 +206,23 @@ def close(self):
self.save()
def as_dict(self):
- return {
+ data = {
'code': self.code,
- 'start_date': self.start_date.isoformat(),
- 'end_date': self.end_date.isoformat(),
+ 'start_date': '',
+ 'end_date': '',
'balance': "%.2f" % self.balance,
'redemptions_url': reverse('account-redemptions',
kwargs={'code': self.code}),
'refunds_url': reverse('account-refunds',
kwargs={'code': self.code})}
+ if self.start_date:
+ data['start_date'] = self.start_date.isoformat()
+ if self.end_date:
+ data['end_date'] = self.end_date.isoformat()
+ return data
+
+
class PostingManager(models.Manager):
"""

No commit comments for this range

Something went wrong with that request. Please try again.