Subversion Repositories SmartDukaan

Rev

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

Rev 18903 Rev 18904
Line 9041... Line 9041...
9041
    return returnMap
9041
    return returnMap
9042
 
9042
 
9043
def get_user_sanction_details_paginated(userId, creditorId, limit=0, offset=0):
9043
def get_user_sanction_details_paginated(userId, creditorId, limit=0, offset=0):
9044
    totalCount = UserSanction.query.filter(UserSanction.active == True).count()
9044
    totalCount = UserSanction.query.filter(UserSanction.active == True).count()
9045
    hasMore = False
9045
    hasMore = False
9046
    if limit >0 and offset > 0 and (limit+offset) < totalCount:
9046
    if limit >0 and (limit+offset) < totalCount:
9047
        hasMore = True 
9047
        hasMore = True 
9048
    us_query = UserSanction.query
9048
    us_query = UserSanction.query
9049
    if userId:
9049
    if userId:
9050
        us_query = us_query.filter(UserSanction.user_id == userId)
9050
        us_query = us_query.filter(UserSanction.user_id == userId)
9051
    if creditorId:
9051
    if creditorId: