# HG changeset patch # User "martin f. krafft" # Date 1344376479 0 # Node ID a479c38931c48f909a21fa42a208fba040516ec6 # Parent 605f8c1157118b5b57646d12de7ecc2b38b0e170 If an alias has multiple destinations, multiple records exist, due to the nature of the database. address_list would then return the same alias multiple times, which does not add any information, eats screen space and is potentially confusing. Therefore, we SELECT DISTINCTly from the alias table. Signed-off-by: martin f. krafft --- VirtualMailManager/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -r 605f8c115711 -r a479c38931c4 VirtualMailManager/common.py --- a/VirtualMailManager/common.py Tue Aug 07 21:53:41 2012 +0000 +++ b/VirtualMailManager/common.py Tue Aug 07 21:54:39 2012 +0000 @@ -221,7 +221,7 @@ queries.append('SELECT gid, local_part, %d AS type FROM users' % TYPE_ACCOUNT) if typelimit & TYPE_ALIAS: - queries.append('SELECT gid, address as local_part, %d AS type ' + queries.append('SELECT DISTINCT gid, address as local_part, %d AS type ' 'FROM alias' % TYPE_ALIAS) if typelimit & TYPE_RELOCATED: queries.append('SELECT gid, address as local_part, %d AS type '