mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
The fix for empty strings should only be applied to oracle sessions
This commit is contained in:
parent
5501be34a8
commit
591d3bb4dd
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue