Fix query bugs for batch row grid views.

It worked until we needed to join a table (vendor in this case).
This commit is contained in:
Lance Edgar 2015-04-06 20:43:55 -05:00
parent fd74fb041b
commit e43ceda6bc

View file

@ -812,8 +812,8 @@ class BatchRowGrid(BaseGrid):
def modify_query(self, q):
q = super(BatchRowGrid, self).modify_query(q)
q = q.filter_by(batch=self.current_batch())
q = q.filter_by(removed=False)
q = q.filter(self.row_class.batch == self.current_batch())
q = q.filter(self.row_class.removed == False)
return q
def join_map(self):