diff -r 7a5bd38c5b98 -r 44161dbb1518 VirtualMailManager/Alias.py --- a/VirtualMailManager/Alias.py Sun Mar 02 23:15:13 2008 +0000 +++ b/VirtualMailManager/Alias.py Mon Mar 03 23:48:07 2008 +0000 @@ -96,8 +96,12 @@ def delete(self): dbc = self._dbh.cursor() - dbc.execute("DELETE FROM alias WHERE gid=%s AND address=%s", - self._gid, self._localpart) + if self._dest is None: + dbc.execute("DELETE FROM alias WHERE gid=%s AND address=%s", + self._gid, self._localpart) + else: + dbc.execute("DELETE FROM alias WHERE gid=%s AND address=%s AND \ + destination=%s", self._gid, self._localpart, self._dest) rowcount = dbc.rowcount dbc.close() if rowcount > 0: