Tweak how we use DB session to fetch grid settings

This commit is contained in:
Lance Edgar 2016-08-19 16:01:44 -05:00
parent a99e129b42
commit 9de5a3b39e

View file

@ -250,7 +250,11 @@ class Grid(object):
if not user:
return False
session = getattr(self, 'session', Session())
# NOTE: we used to leverage `self.session` here, but sometimes we might
# be showing a grid of data from another system...so always use
# Tailbone Session now, for the settings. hopefully that didn't break
# anything...
session = Session()
if user not in session:
user = session.merge(user)