1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Sort out all the non-nullable columns with empty values.

This commit is contained in:
Lynn "Zhorken" Vaughan 2014-02-21 16:21:36 -05:00
parent 7b2743be75
commit 5b759feaa2
4 changed files with 5 additions and 8 deletions
pokedex/db

View file

@ -261,9 +261,6 @@ 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]
# 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
value = None