]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
detect backref string as basestring, not str. [ticket:1301]
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Jan 2009 22:47:28 +0000 (22:47 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Jan 2009 22:47:28 +0000 (22:47 +0000)
lib/sqlalchemy/orm/properties.py

index 73e7943706ba7a3936d16b2b6e314f5e441fe8d0..d5857d965433fab49ad63166f3c7915ec74116e7 100644 (file)
@@ -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: