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:
parent
7b2743be75
commit
5b759feaa2
4 changed files with 5 additions and 8 deletions
pokedex/db
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue