Fix bug when sorting batches by 'executed by' field.
Hopefully this gets it, seems like I may need an alias in there somewhere...
This commit is contained in:
parent
dba0f1fd51
commit
3e940e3c14
|
@ -162,6 +162,8 @@ class BatchGrid(BaseGrid):
|
|||
map_ = {
|
||||
'created_by':
|
||||
lambda q: q.join(model.User, model.User.uuid == self.batch_class.created_by_uuid),
|
||||
'executed_by':
|
||||
lambda q: q.outerjoin(model.User, model.User.uuid == self.batch_class.executed_by_uuid),
|
||||
}
|
||||
map_.update(self.join_map_extras())
|
||||
return map_
|
||||
|
@ -207,7 +209,8 @@ class BatchGrid(BaseGrid):
|
|||
should *not* override this, but :meth:`sort_map_extras()` instead.
|
||||
"""
|
||||
map_ = self.make_sort_map(
|
||||
created_by=self.sorter(model.User.username))
|
||||
created_by=self.sorter(model.User.username),
|
||||
executed_by=self.sorter(model.User.username))
|
||||
map_.update(self.sort_map_extras())
|
||||
return map_
|
||||
|
||||
|
|
Loading…
Reference in a new issue