def exists_dimension(dimension_name,**kwargs):
    """
        Given a dimension returns True if it exists, False otherwise
    """
    try:
        dimension = db.DBSession.query(Dimension).filter(Dimension.name==dimension_name).one()
        # At this point the dimension exists
        return True
    except NoResultFound:
        # The dimension does not exist
        raise False
def exists_dimension ( dimension_name , ** kwargs ) : try : dimension = db . DBSession . query ( Dimension ) . filter ( Dimension . name == dimension_name ) . one ( ) return True except NoResultFound : raise False
Given a dimension returns True if it exists, False otherwise