Commit 36107cd3 authored by Ivan Tyagov's avatar Ivan Tyagov

If missing reference try to get one from group_reference.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14448 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3f1db3f4
...@@ -987,6 +987,10 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin): ...@@ -987,6 +987,10 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
# Prepare the content edit parameters - portal_type should not be changed # Prepare the content edit parameters - portal_type should not be changed
kw.pop('portal_type', None) 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 # Try not to invoke an automatic transition here
self._edit(**kw) self._edit(**kw)
# Finish ingestion by calling method # Finish ingestion by calling method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment