commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7908 - trunk/gnue-forms/src/GFObjects


From: reinhard
Subject: [gnue] r7908 - trunk/gnue-forms/src/GFObjects
Date: Thu, 15 Sep 2005 07:15:48 -0500 (CDT)

Author: reinhard
Date: 2005-09-15 07:15:47 -0500 (Thu, 15 Sep 2005)
New Revision: 7908

Modified:
   trunk/gnue-forms/src/GFObjects/GFBlock.py
Log:
Bugfix: call function on correct record, do requery even if function call
throws an exception.


Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py   2005-09-15 11:48:50 UTC (rev 
7907)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py   2005-09-15 12:15:47 UTC (rev 
7908)
@@ -728,9 +728,14 @@
   def callFunction (self, name, parameters):
     try:
       self.__uncommitted = True
+      # Remember the current record; the record pointer is not reliable between
+      # postAll and requeryAll!
+      current = self._resultSet.current
       self._dataSourceLink.postAll ()
-      res = self._resultSet.current.call (name, parameters)
-      self._dataSourceLink.requeryAll (False)
+      try:
+        res = current.call (name, parameters)
+      finally:
+        self._dataSourceLink.requeryAll (False)
     finally:
       self.switchRecord (0)
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]