If an object has get_url, use that for a link

svn: r19703
This commit is contained in:
Doug Blank 2012-05-30 00:48:26 +00:00
parent 7e82282c07
commit ee794b5077

View File

@ -418,6 +418,9 @@ class SimpleTable(object):
link = (item[1], item[2:])
else:
retval.append(str(item))
if (self.__link_col == col or link is None):
if hasattr(item, "get_url"):
link = ("url", item.get_url())
self.__link.append(link)
self.__rows.append(retval)
@ -478,6 +481,7 @@ class SimpleTable(object):
obj_type, handle = self.__link_col[index]
elif self.__link[index]:
obj_type, handle = self.__link[index]
######
if obj_type:
if obj_type.lower() == "url":
doc.start_link(handle)