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 <madduck@debian.org>
---
VirtualMailManager/common.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- 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