comparison pylons_app/model/db.py @ 462:298546182b41

more test suites on login, fixed strange detached instance bug found during in tests. on __repr__ function fixed timerproxy query formatting
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 05 Sep 2010 23:40:08 +0200
parents 7c978511c951
children 6b934c9607e7
comparison
equal deleted inserted replaced
461:e95621133eb6 462:298546182b41
54 try: 54 try:
55 session = Session.object_session(self) 55 session = Session.object_session(self)
56 self.last_login = datetime.datetime.now() 56 self.last_login = datetime.datetime.now()
57 session.add(self) 57 session.add(self)
58 session.commit() 58 session.commit()
59 log.debug('updated user %s lastlogin',self) 59 log.debug('updated user %s lastlogin',self.username)
60 except Exception: 60 except Exception:
61 session.rollback() 61 session.rollback()
62 62
63 63
64 class UserLog(Base): 64 class UserLog(Base):