[Erp5-report] r14448 - /erp5/trunk/products/ERP5/Document/Document.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 11 08:44:27 CEST 2007


Author: ivan
Date: Fri May 11 08:44:27 2007
New Revision: 14448

URL: http://svn.erp5.org?rev=14448&view=rev
Log:
If missing reference try to get one from group_reference.

Modified:
    erp5/trunk/products/ERP5/Document/Document.py

Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=14448&r1=14447&r2=14448&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Fri May 11 08:44:27 2007
@@ -987,6 +987,10 @@
 
     # Prepare the content edit parameters - portal_type should not be changed
     kw.pop('portal_type', None)
+    # if we still do not have reference extracted try to use group_reference_path
+    # XXX: We must catch inconsistent 're' patterns earlier and raise an exception
+    if kw.get('reference', None) is None:
+      kw['reference'] = kw.pop('group_reference_path', None)
     # Try not to invoke an automatic transition here
     self._edit(**kw)
     # Finish ingestion by calling method




More information about the Erp5-report mailing list