Subversion Repositories SmartDukaan

Rev

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

Rev 3064 Rev 3072
Line 682... Line 682...
682
    limit if it's passed as 0. Raises an excpetion if the supplied limit is 
682
    limit if it's passed as 0. Raises an excpetion if the supplied limit is 
683
    less than 0. 
683
    less than 0. 
684
    '''
684
    '''
685
    if limit < 0:
685
    if limit < 0:
686
        raise TransactionServiceException(101, "Invalid argument limit " + limit)
686
        raise TransactionServiceException(101, "Invalid argument limit " + limit)
687
    query = Order.query.filter(Order.status >= OrderStatus.SUBMITTED_FOR_PROCESSING)
687
    query = Order.query.filter(Order.status >= OrderStatus.INIT)
688
    query = query.order_by(desc(Order.created_timestamp))
688
    query = query.order_by(desc(Order.created_timestamp))
689
    if limit != 0:
689
    if limit != 0:
690
        query = query.limit(limit)
690
        query = query.limit(limit)
691
    return query.all()
691
    return query.all()
692
 
692