From: Mike Bayer Date: Fri, 30 Jan 2009 22:47:28 +0000 (+0000) Subject: detect backref string as basestring, not str. [ticket:1301] X-Git-Tag: rel_0_5_3~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85e8509399d1617f0dfc18cc1a0c5aeb10c3ccc7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git detect backref string as basestring, not str. [ticket:1301] --- diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 73e7943706..d5857d9654 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -417,7 +417,7 @@ class RelationProperty(StrategizedProperty): if backref: raise sa_exc.ArgumentError("backref and back_populates keyword arguments are mutually exclusive") self.backref = None - elif isinstance(backref, str): + elif isinstance(backref, basestring): # propagate explicitly sent primary/secondary join conditions to the BackRef object if # just a string was sent if secondary is not None: