# HG changeset patch # User Mads Kiilerich # Date 1604323822 -3600 # Node ID 28b845dca1fd48220e1faab7631afee009a6eac5 # Parent f3e91cd075ebcf49521922861599e04549d00182 lib: drop unnecessary user db lookup in log_pull_action diff -r f3e91cd075eb -r 28b845dca1fd kallithea/lib/hooks.py --- a/kallithea/lib/hooks.py Tue Oct 20 00:54:59 2020 +0200 +++ b/kallithea/lib/hooks.py Mon Nov 02 14:30:22 2020 +0100 @@ -86,15 +86,14 @@ def log_pull_action(ui, repo, **kwargs): """Logs user last pull action - Called as Mercurial hook outgoing.pull_logger or from Kallithea before invoking Git. + Called as Mercurial hook outgoing.kallithea_log_pull_action or from Kallithea before invoking Git. Does *not* use the action from the hook environment but is always 'pull'. """ ex = get_hook_environment() - user = db.User.get_by_username(ex.username) action = 'pull' - action_logger(user, action, ex.repository, ex.ip, commit=True) + action_logger(ex.username, action, ex.repository, ex.ip, commit=True) # extension hook call callback = getattr(kallithea.EXTENSIONS, 'PULL_HOOK', None) if callable(callback):