Project

General

Profile

« Previous | Next » 

Revision 5827

sql_io.py: put_table(): ensure_cond(): Fixed bug where test if any rows failed cond did not check if cur != None (which is the case when cond == sql_gen.true_expr) before checking cur.rowcount

View differences:

lib/sql_io.py
490 490
            elif cond == sql_gen.true_expr: assert passed
491 491
            else: cur = sql.delete(db, insert_in_table, not_cond)
492 492
            
493
            if failed or cur.rowcount > 0: # only if any rows failed cond
493
            # If any rows failed cond
494
            if failed or cur != None and cur.rowcount > 0:
494 495
                track_data_error(db, errors_table_,
495 496
                    sql_gen.cross_join_srcs(in_cols), None, e.cause.pgcode,
496 497
                    strings.ensure_newl(e.cause.pgerror)+'condition: '+orig_cond

Also available in: Unified diff