From: Mike Bayer Date: Fri, 8 Aug 2008 05:15:18 +0000 (+0000) Subject: even better... X-Git-Tag: rel_0_5rc1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c73391c34c90fde517c87ff4f5cc181d060ddf95;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git even better... --- diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index ee05625a91..dd470f358c 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -1064,7 +1064,8 @@ class ClassManager(dict): if isinstance(meth, types.FunctionType) and \ hasattr(meth, '__sa_reconstitute__') and \ hasattr(getattr(class_, key), '__sa_reconstitute__'): - self.events.add_listener('on_load', meth) + self.events.add_listener('on_load', getattr(class_, key)) + break def instantiable(self, boolean): # experiment, probably won't stay in this form