# HG changeset patch # User "martin f. krafft" # Date 1344376421 0 # Node ID 605f8c1157118b5b57646d12de7ecc2b38b0e170 # Parent 9c138471d5693da26ae7a5953a6dedbddbec5d5c Due to the UNION query in address_list, the assumption that the list of gids received from the database would be continuous does not hold. To prevent addresses for domains with multiple entry types from being listed, it is necessary to check the list of domain gids for every entry. Signed-off-by: martin f. krafft --- VirtualMailManager/common.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -r 9c138471d569 -r 605f8c115711 VirtualMailManager/common.py --- a/VirtualMailManager/common.py Sun Jul 29 16:44:20 2012 +0000 +++ b/VirtualMailManager/common.py Tue Aug 07 21:53:41 2012 +0000 @@ -250,11 +250,9 @@ gids = [] daddrs = {} - lastgid = None for gid, address, addrtype, aliasdomain in result: - if gid != lastgid: + if gid not in gids: gids.append(gid) - lastgid = gid daddrs[gid] = [] daddrs[gid].append((address, addrtype, aliasdomain)) return gids, daddrs