Skip to content

Commit

Permalink
sqlalchemy expressions in grids helper
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jul 13, 2015
1 parent 8a031fb commit e68e81d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/galaxy/web/framework/helpers/grids.py
Expand Up @@ -10,7 +10,7 @@
from galaxy.web.framework.helpers import iff
from markupsafe import escape

from sqlalchemy.sql.expression import and_, func, or_
from sqlalchemy.sql.expression import and_, func, or_, null, false, true


log = logging.getLogger( __name__ )
Expand Down Expand Up @@ -770,14 +770,14 @@ def filter( self, trans, user, query, column_filter ):
pass
elif column_filter:
if column_filter == "private":
query = query.filter( self.model_class.users_shared_with == None ) # noqa
query = query.filter( self.model_class.importable == False ) # noqa
query = query.filter( self.model_class.users_shared_with == null() )
query = query.filter( self.model_class.importable == false() )
elif column_filter == "shared":
query = query.filter( self.model_class.users_shared_with != None ) # noqa
query = query.filter( self.model_class.users_shared_with != null() )
elif column_filter == "accessible":
query = query.filter( self.model_class.importable == True ) # noqa
query = query.filter( self.model_class.importable == true() )
elif column_filter == "published":
query = query.filter( self.model_class.published == True ) # noqa
query = query.filter( self.model_class.published == true() )
return query

def get_accepted_filters( self ):
Expand Down

0 comments on commit e68e81d

Please sign in to comment.