Changeset 9818 for src/django_gheat/gheat/dataimport
- Timestamp:
- Dec 23, 2011, 8:28:57 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/dataimport/__init__.py
r9668 r9818 44 44 try: 45 45 # Make sure the special NULL is preserved 46 sql = "INSERT INTO %s VALUES %s" % (sql_table, ','.join(sql_values).replace(" 'NULL'",'NULL'))46 sql = "INSERT INTO %s VALUES %s" % (sql_table, ','.join(sql_values).replace("None",'NULL').replace("'NULL'",'NULL')) 47 47 count = cursor.execute(sql) 48 48 transaction.commit_unless_managed() … … 85 85 for bssid in bssid_list_insert: 86 86 ssid, encryption = ap_pool[bssid] 87 type = Accespoint.get_type_by_ssid(ssid) 87 88 # Special trick in SSID ts avoid escaping in later stage 88 89 item = str((bssid.upper(),ssid.replace('%','%%'),encryption, 90 Accespoint.get_type_by_ssid(ssid), 89 91 get_organization_id_by_ssid(ssid))) 90 92 sql_values.append(item) 91 93 counters['ap_added'] = bulk_sql('gheat_accespoint (`mac`, `ssid`,\ 92 `encryptie`, ` organization_id`)',sql_values)94 `encryptie`, `type`, `organization_id`)',sql_values) 93 95 return counters 94 96
Note:
See TracChangeset
for help on using the changeset viewer.