[db-check] don't check entities from external sources have owned_by stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 20 Apr 2010 10:42:58 +0200
branchstable
changeset 5340 4de474016568
parent 5339 b83327846450
child 5341 0de53140bd29
[db-check] don't check entities from external sources have owned_by
server/checkintegrity.py
--- a/server/checkintegrity.py	Tue Apr 20 10:42:35 2010 +0200
+++ b/server/checkintegrity.py	Tue Apr 20 10:42:58 2010 +0200
@@ -265,7 +265,7 @@
     assert default_user_eid is not None, 'no user defined !'
     for rel, default in ( ('owned_by', default_user_eid), ):
         cursor = session.system_sql("SELECT eid, type FROM entities "
-                                    "WHERE NOT EXISTS "
+                                    "WHERE source='system' AND NOT EXISTS "
                                     "(SELECT 1 FROM %s_relation WHERE eid_from=eid);"
                                     % rel)
         for eid, etype in cursor.fetchall():