server/checkintegrity.py
changeset 381 e51deabc9b6a
parent 380 06e7f2932afe
child 713 5adb6d8e5fa7
child 1161 936c311010fc
equal deleted inserted replaced
380:06e7f2932afe 381:e51deabc9b6a
   196                     if not has_eid(cursor, eid, eids):
   196                     if not has_eid(cursor, eid, eids):
   197                         bad_related_msg(rtype, 'object', eid, fix)
   197                         bad_related_msg(rtype, 'object', eid, fix)
   198                         if fix:
   198                         if fix:
   199                             sql = 'UPDATE %s SET %s = NULL WHERE eid=%s;' % (
   199                             sql = 'UPDATE %s SET %s = NULL WHERE eid=%s;' % (
   200                                 subjtype, rtype, eid)
   200                                 subjtype, rtype, eid)
   201                             session.system_sql()
   201                             session.system_sql(sql)
   202             continue
   202             continue
   203         cursor = session.system_sql('SELECT eid_from FROM %s_relation;' % rtype)
   203         cursor = session.system_sql('SELECT eid_from FROM %s_relation;' % rtype)
   204         for row in cursor.fetchall():
   204         for row in cursor.fetchall():
   205             eid = row[0]
   205             eid = row[0]
   206             if not has_eid(cursor, eid, eids):
   206             if not has_eid(cursor, eid, eids):