diff --git a/rattail/app.py b/rattail/app.py index 0d7622b5726eaa69b0fe06962864a55009df2970..a1dfb573d8b3b94a08d4f754ecbdc09069378040 100644 --- a/rattail/app.py +++ b/rattail/app.py @@ -36,6 +36,7 @@ import tempfile import warnings import logging from collections import OrderedDict +from functools import partial import humanize from mako.template import Template @@ -1194,7 +1195,13 @@ class AppHandler(object): def short_session(self, **kwargs): from rattail.db.util import short_session - kwargs.setdefault('factory', self.make_session) + + if 'factory' not in kwargs: + # nb. usually want to avoid continuum user lookup for + # short session, but caller can override if needed + kwargs['factory'] = partial(self.make_session, + continuum_user=None) + return short_session(**kwargs) def cache_model(self, session, model, **kwargs):