VirtualMailManager/Domain.py
changeset 110 cb8b2f6a5fca
parent 102 485d3f7d6981
child 122 30abf0abf8f8
equal deleted inserted replaced
109:766299a8639d 110:cb8b2f6a5fca
   168         Keyword arguments:
   168         Keyword arguments:
   169         transport -- the new transport (str)
   169         transport -- the new transport (str)
   170         force -- True/False force new transport for all accounts (bool)
   170         force -- True/False force new transport for all accounts (bool)
   171         """
   171         """
   172         if self._id > 0:
   172         if self._id > 0:
       
   173             if transport == self._transport.getTransport():
       
   174                 return
   173             trsp = Transport(self._dbh, transport=transport)
   175             trsp = Transport(self._dbh, transport=transport)
   174             dbc = self._dbh.cursor()
   176             dbc = self._dbh.cursor()
   175             dbc.execute("UPDATE domain_data SET tid = %s WHERE gid = %s",
   177             dbc.execute("UPDATE domain_data SET tid = %s WHERE gid = %s",
   176                     trsp.getID(), self._id)
   178                     trsp.getID(), self._id)
   177             if dbc.rowcount > 0:
   179             if dbc.rowcount > 0: