VirtualMailManager/domain.py
branchv0.6.x
changeset 379 7518d927d443
parent 366 d6573da35b5f
child 390 660b42391c8e
--- a/VirtualMailManager/domain.py	Tue Feb 01 16:57:09 2011 +0000
+++ b/VirtualMailManager/domain.py	Wed Feb 02 19:03:54 2011 +0000
@@ -166,10 +166,11 @@
                          DOMAIN_EXISTS)
         assert self._directory is not None and self._transport is not None
         dbc = self._dbh.cursor()
-        dbc.execute("INSERT INTO domain_data VALUES (%s, %s, %s)", (self._gid,
-                    self._transport.tid, self._directory))
-        dbc.execute("INSERT INTO domain_name VALUES (%s, %s, %s)", (self._name,
-                    self._gid, True))
+        dbc.execute('INSERT INTO domain_data (gid, tid, domaindir) VALUES '
+                    '(%s, %s, %s)', (self._gid, self._transport.tid,
+                                     self._directory))
+        dbc.execute('INSERT INTO domain_name (domainname, gid, is_primary) '
+                    'VALUES (%s, %s, TRUE)', (self._name, self._gid))
         self._dbh.commit()
         dbc.close()
         self._new = False