commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r7201 - trunk/gnue-common/src/datasources/drivers/appserver/appse


From: reinhard
Subject: [gnue] r7201 - trunk/gnue-common/src/datasources/drivers/appserver/appserver
Date: Mon, 14 Mar 2005 04:50:33 -0600 (CST)

Author: reinhard
Date: 2005-03-14 04:50:32 -0600 (Mon, 14 Mar 2005)
New Revision: 7201

Modified:
   trunk/gnue-common/src/datasources/drivers/appserver/appserver/RecordSet.py
Log:
Removed a few obsolete checks: There can't be a RecordSet without gnue_id any
more (as the gnue_id is now generated by __init__) and update of status flags
is done by _postChanges.


Modified: 
trunk/gnue-common/src/datasources/drivers/appserver/appserver/RecordSet.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/appserver/appserver/RecordSet.py  
2005-03-14 10:17:00 UTC (rev 7200)
+++ trunk/gnue-common/src/datasources/drivers/appserver/appserver/RecordSet.py  
2005-03-14 10:50:32 UTC (rev 7201)
@@ -65,14 +65,6 @@
     @return: return value of the procedure
     """
 
-    if self._fields.get ('gnue_id') is None:
-      raise errors.ApplicationError, u_("Function call for empty record")
-
-    # Before calling the function, post all pending changes to the server
-    empty  = self._emptyFlag
-    insert = self._insertFlag
-    update = self._updateFlag
-
     # Find out the top level record set regarding to master-/detail and call
     # this recordset's post (). This will do implicit post's on the details
     current = self._parent
@@ -82,25 +74,14 @@
 
     current.post ()
 
-    try:
-      result = self.__sm.call (self.__session_id,
-                               self.__classname,
-                               [self._fields ['gnue_id']],
-                               methodname,
-                               parameters) [0]
+    result = self.__sm.call (self.__session_id,
+                             self.__classname,
+                             [self._fields ['gnue_id']],
+                             methodname,
+                             parameters) [0]
 
-      self.__updateFields ()
+    self.__updateFields ()
 
-      self._updateFlag = True
-      self._emptyFlag  = False
-
-    except:
-      self._emptyFlag  = empty
-      self._insertFlag = insert
-      self._updateFlag = update
-
-      raise
-
     return result
 
 
@@ -116,14 +97,6 @@
     record's class definition.
     """
 
-    if self._fields.get ('gnue_id') is None:
-      return
-
-    # Before calling the function, post all pending changes to the server
-    empty  = self._emptyFlag
-    insert = self._insertFlag
-    update = self._updateFlag
-
     # Find out the top level record set regarding to master-/detail and call
     # this recordset's post (). This will do implicit post's on the details
     current = self._parent
@@ -131,25 +104,9 @@
     while current._masterRecordSet is not None:
       current = current._masterRecordSet._parent
 
-    try:
-      current.post ()
+    current.post ()
 
-      self.__updateFields ()
 
-      # Should we check if the _fields really have changed during the post to
-      # set the flags ?
-      self._updateFlag = True
-      self._emptyFlag  = False
-
-    except:
-      self._emptyFlag  = empty
-      self._insertFlag = insert
-      self._updateFlag = update
-
-      raise
-
-
-
   # ---------------------------------------------------------------------------
   # Initialize a record 
   # ---------------------------------------------------------------------------





reply via email to

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