Project

General

Profile

« Previous | Next » 

Revision 5329

sql_gen.py: ensure_not_null(): Always remove_col_rename() the column to ensure that it is acceptable by helper functions like is_nullable()

View differences:

lib/sql_gen.py
1062 1062
    @return EnsureNotNull|Col
1063 1063
    @throws ensure_not_null_excs
1064 1064
    '''
1065
    col = remove_col_rename(col)
1065 1066
    nullable = True
1066 1067
    try: typed_col = db.col_info(underlying_col(col))
1067 1068
    except NoUnderlyingTableException:
1068
        col = remove_col_rename(col)
1069 1069
        if is_literal(col) and not is_null(col): nullable = False
1070 1070
        elif type_ == None: raise
1071 1071
    else:

Also available in: Unified diff