Fixed a libpq.OperationalError in Account.delete()
authorPascal Volk <neverseen@users.sourceforge.net>
Tue, 18 Aug 2009 02:29:15 +0000
changeset 114 e671210b04b8
parent 113 e35755191ff3
child 115 21f264a88ab2
Fixed a libpq.OperationalError in Account.delete() Passing only the object's address string to the 'alias delete' query, not the whole EmailAddress object.
VirtualMailManager/Account.py
--- a/VirtualMailManager/Account.py	Mon Aug 17 06:31:14 2009 +0000
+++ b/VirtualMailManager/Account.py	Tue Aug 18 02:29:15 2009 +0000
@@ -221,7 +221,8 @@
             u_rc = dbc.rowcount
             # delete also all aliases where the destination address is the same
             # as for this account.
-            dbc.execute("DELETE FROM alias WHERE destination = %s", self._addr)
+            dbc.execute("DELETE FROM alias WHERE destination = %s",
+                    str(self._addr))
             if u_rc > 0 or dbc.rowcount > 0:
                 self._dbh.commit()
         else: # check first for aliases