Project

General

Profile

« Previous | Next » 

Revision 2209

sql.py: get(): Fixed bug where limit=1 needs to be passed to select() as a keyword arg now that the distinct_on param comes before it

View differences:

sql.py
751 751

  
752 752
def get(db, table, row, pkey, row_ct_ref=None, create=False):
753 753
    '''Recovers from errors'''
754
    try: return value(select(db, table, [pkey], row, 1, recover=True))
754
    try: return value(select(db, table, [pkey], row, limit=1, recover=True))
755 755
    except StopIteration:
756 756
        if not create: raise
757 757
        return put(db, table, row, pkey, row_ct_ref) # insert new row

Also available in: Unified diff