Handle None

static-cp-fix
Drew DeVault 8 years ago
parent 1b81d867ea
commit 2e1b9c7883
  1. 3
      fosspay/objects.py

@ -71,10 +71,11 @@ class Donation(Base):
self.created = datetime.now() self.created = datetime.now()
self.updated = datetime.now() self.updated = datetime.now()
self.emailed_about = False self.emailed_about = False
self.project_id = project.id
self.comment = comment self.comment = comment
self.active = True self.active = True
self.payments = 1 self.payments = 1
if project:
self.project_id = project.id
def __repr__(self): def __repr__(self):
return "<Donation {} from {}: ${} ({})>".format( return "<Donation {} from {}: ${} ({})>".format(

Loading…
Cancel
Save