simplified _get_colspec

This commit is contained in:
Gaëtan de Menten
2008-07-02 12:58:57 +00:00
parent c571fd6f8a
commit 38180f855a
+1 -5
View File
@@ -789,12 +789,8 @@ class ForeignKey(SchemaItem):
def _get_colspec(self):
if isinstance(self._colspec, basestring):
return self._colspec
elif self._colspec.table.schema is not None:
return "%s.%s.%s" % (self._colspec.table.schema,
self._colspec.table.name, self._colspec.key)
else:
return "%s.%s" % (self._colspec.table.name, self._colspec.key)
return "%s.%s" % (self._colspec.table.fullname, self._colspec.key)
target_fullname = property(_get_colspec)
def references(self, table):