Użytkownik Ed Leafe napisał:
> dabo Commit
> Revision 6046
> Date: 2010-10-02 07:38:25 -0700 (Sat, 02 Oct 2010)
> Author: Ed
> Trac: http://trac.dabodev.com/changeset/6046
>
> Changed:
> U   trunk/dabo/biz/dBizobj.py
>
> Log:
> Fixed an issue #1373 in which child bizobjs that did not link to the parent's 
> PK column threw exceptions. Issue reported and patch created by Jacek 
> Ka?\197?\130ucki.
>    

Sorry, but this commit doesn't fix issue, because child bizobj
is still updated, even if it has FillLinkFromParent property set to False.
Look into _onNew() method, where this property is properly checked,
and setParentFK() is conditionally called.
My exact patch proposal is:

--- dBizobj.py    (revision 6047)
+++ dBizobj.py    (working copy)
@@ -1397,9 +1399,9 @@
          # If this is a new parent record with a new auto-generated PK, 
pass it on
          # to the children before they save themselves.
          if self.AutoPopulatePK:
-            pk = self.getPK()
              for child in self.__children:
-                child.setParentFK()
+                if child.FillLinkFromParent:
+                    child.setParentFK()
          # Call the custom hook method
          self.onSaveNew()


-- 
Regards
Jacek Kałucki


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to