potential fix for recursion issue

Issue #1501 resolved
Former user created an issue

We (MoinMoin wiki development) are working on a sqla backend. We ran into a recursion problem.

See there: http://pastebin.com/f2497fe2c

Fix(?):

--- state.py.orig-0.5.5 2009-07-13 21:01:29.000000000 +0200
+++ state.py    2009-08-14 09:07:57.000000000 +0200
@@ -276,7 +276,7 @@
                 instance_dict._modified.add(self)

         self.modified = True
-        if not self._strong_obj:
+        if self._strong_obj is None:
             self._strong_obj = self.obj()

     def commit(self, dict_, keys):

Please check if this fix is valid (I have no clue about sqla :D ).

Comments (5)

  1. jek

    I think I've hit this line as well, with a mapped instance that had a failing len method. --truthless didn't seem to catch this one in the tests.

  2. Mike Bayer repo owner

    ah yes that should be committed to 0.5.6 and 0.6, if someone can do a quick unittest (hey jek looks like you've got a minute ! :) ). im on vaca as of tomorrow.

  3. Log in to comment