Mercurial > kallithea
changeset 8740:28b845dca1fd
lib: drop unnecessary user db lookup in log_pull_action
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 02 Nov 2020 14:30:22 +0100 |
parents | f3e91cd075eb |
children | 9b7c5d7ad1a2 |
files | kallithea/lib/hooks.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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):