Fix bug with "memory" of mobile grid filters
This commit is contained in:
parent
72b2510681
commit
148cbd2f57
|
@ -311,8 +311,12 @@ class Grid(object):
|
|||
"""
|
||||
Determine if the current session contains any settings for the grid.
|
||||
"""
|
||||
# Session should have all or nothing, so just check one key.
|
||||
return 'grid.{0}.sortkey'.format(self.key) in self.request.session
|
||||
# session should have all or nothing, so just check a few keys which
|
||||
# should be guaranteed present if anything has been stashed
|
||||
for key in ['page', 'sortkey']:
|
||||
if 'grid.{}.{}'.format(self.key, key) in self.request.session:
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_setting(self, source, settings, key, coerce=lambda v: v, default=None):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue