Subversion Repositories SmartDukaan

Rev

Rev 20353 | Rev 20355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20353 Rev 20354
Line 828... Line 828...
828
def get_latest_arrivals_counting_query(obj, categories, brand):
828
def get_latest_arrivals_counting_query(obj, categories, brand):
829
    '''
829
    '''
830
    Returns the query to be used to count Latest arrivals.
830
    Returns the query to be used to count Latest arrivals.
831
    To ignore the categories, pass the list as empty. To ignore brand, pass it as null.
831
    To ignore the categories, pass the list as empty. To ignore brand, pass it as null.
832
    '''
832
    '''
833
    query = session.query(obj).filter(Item.status.in_([status.ACTIVE, status.PAUSED_BY_RISK])).query(obj)
833
    query = session.query(obj).filter(Item.status.in_([status.ACTIVE, status.PAUSED_BY_RISK]))
834
    #query = session.query(obj).filter_by(status=status.ACTIVE)
834
    #query = session.query(obj).filter_by(status=status.ACTIVE)
835
   
835
   
836
    all_categories = []
836
    all_categories = []
837
    for category in categories:
837
    for category in categories:
838
        all_categories.append(category)
838
        all_categories.append(category)