Mercurial > kallithea
diff pylons_app/lib/hooks.py @ 536:39203995f2c4
made action logger more global, to be used in other places to log other actions.
cleaned unused import in simpleHG, fixed little logging in hooks
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 02 Oct 2010 01:52:43 +0200 |
parents | 3d6d548ad3cc |
children |
line wrap: on
line diff
--- a/pylons_app/lib/hooks.py Fri Oct 01 03:04:52 2010 +0200 +++ b/pylons_app/lib/hooks.py Sat Oct 02 01:52:43 2010 +0200 @@ -63,10 +63,10 @@ username = kwargs['url'].split(':')[-1] user_log = sa.query(UserLog)\ .filter(UserLog.user == sa.query(User)\ - .filter(User.username == username).one())\ + .filter(User.username == username).one())\ .order_by(UserLog.user_log_id.desc()).first() - - if not user_log.revision: + + if user_log and not user_log.revision: user_log.revision = str(repo['tip']) sa.add(user_log) sa.commit()