SQLConnectionIDs bug in ZSQLMethods Product
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Products.ZSQLMethods |
Invalid
|
Medium
|
Unassigned |
Bug Description
The SQL.py module in the ZSQLMetohds Product provides a method to list all availble SQL Connections. It's purpose, or so it seems, is to return a list of tuples, where the first item in the tuple is the connection's title (if available) and the second item the connection's id.
However, in constructing the the list of tuple, a dictionary is used with the connection id for key *and* the id for value - the connection's title is never used.
I'd propose this patch:
$ diff SQL.py SQL-patched.py
40,42c40,44
< if hasattr(
< else: o=id
< ids[id]=id
---
> if hasattr(
> title = o.title_and_id()
> else:
> title = id
> ids[id] = title
affects: | zope2 → products.zsqlmethods |
Still true in Zope trunk.