summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Johnston <paj@pajhome.org.uk>2007-09-04 22:35:00 +0000
committerPaul Johnston <paj@pajhome.org.uk>2007-09-04 22:35:00 +0000
commit43a927f6e03e1c87c4ea9f1ffe6dce6d794ccdda (patch)
tree41d2c15924007153b9f0fed07f64831e13f64b8e /lib
parent07fad643a6f6cc78195ac1be44040a947f2956ec (diff)
downloadsqlalchemy-43a927f6e03e1c87c4ea9f1ffe6dce6d794ccdda.tar.gz
Small change in ActiveMapper to make it work with Python 2.3
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/ext/activemapper.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/activemapper.py b/lib/sqlalchemy/ext/activemapper.py
index 9c4b29b22..e5200e057 100644
--- a/lib/sqlalchemy/ext/activemapper.py
+++ b/lib/sqlalchemy/ext/activemapper.py
@@ -159,7 +159,8 @@ def process_relationships(klass, was_deferred=False):
for col in klass.columns:
if col.foreign_key is not None:
found = False
- table_name = col.foreign_key._colspec.rsplit('.', 1)[0]
+ cn = col.foreign_key._colspec
+ table_name = cn[:cn.rindex('.')]
for other_klass in ActiveMapperMeta.classes.values():
if other_klass.table.fullname.lower() == table_name.lower():
found = True