VMM/domain: Execute the database updates of v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Sun, 13 Feb 2011 03:32:31 +0000
branchv0.6.x
changeset 402 8984b1f4e6e3
parent 401 00a8c12a3da3
child 403 a4f5d4cd886d
VMM/domain: Execute the database updates of Domain.update_{quotalimit,transport}() when argument force is True, even when the 'new' setting is the same as the current one.
VirtualMailManager/domain.py
--- a/VirtualMailManager/domain.py	Sat Feb 12 20:40:44 2011 +0000
+++ b/VirtualMailManager/domain.py	Sun Feb 13 03:32:31 2011 +0000
@@ -268,7 +268,7 @@
         """
         self._chk_state()
         assert isinstance(quotalimit, QuotaLimit)
-        if quotalimit == self._qlimit:
+        if not force and quotalimit == self._qlimit:
             return
         self._update_tables('qid', quotalimit.qid, force)
         self._qlimit = quotalimit
@@ -289,7 +289,7 @@
         """
         self._chk_state()
         assert isinstance(transport, Transport)
-        if transport == self._transport:
+        if not force and transport == self._transport:
             return
         self._update_tables('tid', transport.tid, force)
         self._transport = transport