Fikset feil i Purchase.__repr__ (den refererte til ting som ikke finnes lenger).

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2010-05-16 18:36:10 +00:00
parent af9e8893df
commit 945e6529f5

2
db.py
View File

@ -111,7 +111,7 @@ class Purchase(Base):
pass pass
def __repr__(self): def __repr__(self):
return "<Purchase('%s', '%s', '%s')>" % (self.user.name, self.price, self.time.strftime('%c')) return "<Purchase(%d, %d, '%s')>" % (self.id, self.price, self.time.strftime('%c'))
def is_complete(self): def is_complete(self):
return len(self.transactions) > 0 and len(self.entries) > 0 return len(self.transactions) > 0 and len(self.entries) > 0