Changeset 9598 for src/django_gheat


Ignore:
Timestamp:
Aug 28, 2011, 4:02:07 PM (13 years ago)
Author:
rick
Message:

NULL is really database NULL and not string 'NULL';

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/management/commands/import_droidstumbler.py

    r9592 r9598  
    3232  cursor = connection.cursor()
    3333  try:
    34     sql = "INSERT INTO %s VALUES %s" % (sql_table, ','.join(sql_values))
     34    # Make sure the special NULL is preserved
     35    sql = "INSERT INTO %s VALUES %s" % (sql_table, ','.join(sql_values).replace("'NULL'",'NULL'))
    3536    count = cursor.execute(sql)
    3637    transaction.commit_unless_managed()
Note: See TracChangeset for help on using the changeset viewer.