Project

General

Profile

« Previous | Next » 

Revision 5289

sql_io.py: put_table(): Resolving default value column: Fixed bug where the default value col needed to have its table changed from in_table to full_in_table if it's a table column, and needed to have any column rename removed if it's a literal value

View differences:

sql_io.py
680 680
                +strings.as_tt(strings.repr_no_u(default))
681 681
                +' does not exist in mapping, falling back to None', level=2.1)
682 682
            default = None
683
        else:
684
            if sql_gen.is_table_col(default):
685
                default = sql_gen.with_table(default, full_in_table)
686
            else: default = sql_gen.remove_col_rename(default)
683 687
    
684 688
    if missing_msg != None and default == None:
685 689
        warnings.warn(UserWarning(missing_msg))
......
689 693
    # Handle unrecoverable errors
690 694
    if limit_ref[0] == 0:
691 695
        if is_literals or default == None:
692
            default = sql_gen.remove_col_rename(default)
693 696
            log_debug('Returning default: '
694 697
                +strings.as_tt(strings.urepr(default)))
695 698
            return default

Also available in: Unified diff