server/session.py
branchstable
changeset 7730 8d0edec31aaf
parent 7706 359bc86d2827
child 7757 5b3584c5a7c3
--- a/server/session.py	Tue Aug 02 17:31:06 2011 +0200
+++ b/server/session.py	Tue Aug 02 17:37:55 2011 +0200
@@ -1180,7 +1180,8 @@
     def _build_descr(self, result, basedescription, todetermine):
         description = []
         etype_from_eid = self.describe
-        for row in result:
+        todel = []
+        for i, row in enumerate(result):
             row_descr = basedescription[:]
             for index, isfinal in todetermine:
                 value = row[index]
@@ -1194,10 +1195,14 @@
                     try:
                         row_descr[index] = etype_from_eid(value)[0]
                     except UnknownEid:
-                        self.critical('wrong eid %s in repository, you should '
-                                      'db-check the database' % value)
-                        row_descr[index] = row[index] = None
-            description.append(tuple(row_descr))
+                        self.error('wrong eid %s in repository, you should '
+                                   'db-check the database' % value)
+                        todel.append(i)
+                        break
+            else:
+                description.append(tuple(row_descr))
+        for i in reversed(todel):
+            del result[i]
         return description
 
     # deprecated ###############################################################