entity.py
branchstable
changeset 3680 af3656d03376
parent 3679 983c1af59c2a
child 3683 2e4794c97cf4
--- a/entity.py	Thu Oct 15 11:39:41 2009 +0200
+++ b/entity.py	Thu Oct 15 11:54:05 2009 +0200
@@ -810,7 +810,7 @@
         else raise `KeyError`
         """
         res = self._related_cache['%s_%s' % (rtype, role)][entities]
-        if limit is not None and limit < len(rset):
+        if limit is not None and limit < len(res):
             if entities:
                 res = res[:limit]
             else: