The fix for empty strings should only be applied to oracle sessions

This commit is contained in:
Epithumia 2013-12-18 14:42:23 +01:00
parent 5501be34a8
commit 591d3bb4dd

View file

@ -268,7 +268,8 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
for column_name, value in zip(column_names, csvs):
column = table_obj.c[column_name]
if not column.nullable and value == '':
# Oracle treats empty strings as NULL
if not column.nullable and value == '' and oranames:
value = ' '
if column.nullable and value == '':
# Empty string in a nullable column really means NULL