Ignore:
Timestamp:
Dec 23, 2011, 8:28:57 AM (13 years ago)
Author:
rick
Message:

Type is needed to start playing around with filters based on the function/type of a unit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/dataimport/__init__.py

    r9668 r9818  
    4444  try:
    4545    # 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'))
    4747    count = cursor.execute(sql)
    4848    transaction.commit_unless_managed()
     
    8585    for bssid in bssid_list_insert:
    8686      ssid, encryption = ap_pool[bssid]
     87      type = Accespoint.get_type_by_ssid(ssid)
    8788      # Special trick in SSID ts avoid escaping in later stage
    8889      item = str((bssid.upper(),ssid.replace('%','%%'),encryption,
     90         Accespoint.get_type_by_ssid(ssid),
    8991        get_organization_id_by_ssid(ssid)))
    9092      sql_values.append(item)
    9193    counters['ap_added'] = bulk_sql('gheat_accespoint (`mac`, `ssid`,\
    92       `encryptie`, `organization_id`)',sql_values)
     94      `encryptie`, `type`, `organization_id`)',sql_values)
    9395  return counters
    9496
Note: See TracChangeset for help on using the changeset viewer.