Changeset 2855

Show
Ignore:
Timestamp:
02/25/07 23:37:36 (2 years ago)
Author:
paul
Message:

Fixed dCursorMixin to raise NoRecordsException? when calling oldval() with
no records.

Fixed dBizobj to not try to fill the parent link field if there is no
parent.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/biz/dBizobj.py

    r2836 r2855  
    3434        self._conn = conn 
    3535 
    36         super(dBizobj, self).__init__(properties=properties, *args, **kwargs) 
    37  
    3836        cn = self._conn 
    3937        if cn: 
     
    4543            self.createCursor() 
    4644 
    47  
    4845        # We need to make sure the cursor is created *before* the call to 
    4946        # initProperties() 
    5047        self._initProperties() 
     48        super(dBizobj, self).__init__(properties=properties, *args, **kwargs) 
    5149        self._afterInit() 
    5250        self.__att_try_setFieldVal = True 
     
    721719        is built. 
    722720        """ 
    723         if self.DataSource and self.LinkField
     721        if self.DataSource and self.LinkField and self.Parent
    724722            if self.Parent.IsAdding: 
    725723                # Parent is new and not yet saved, so we cannot have child records yet. 
  • trunk/dabo/db/dCursorMixin.py

    r2848 r2855  
    19131913    def oldVal(self, fieldName, row=None): 
    19141914        """Returns the value of the field as it existed after the last requery.""" 
     1915        if self.RowCount < 1: 
     1916            raise dabo.dException.NoRecordsException 
    19151917        if row is None: 
    19161918            row = self.RowNumber