Check full OID when looking for associations
authorThierry Florac <tflorac@ulthar.net>
Fri, 06 Apr 2018 23:14:49 +0200
changeset 525 72e35444c6b2
parent 524 6de7d0a3a77d
child 526 b15153f45957
Check full OID when looking for associations
src/pyams_content/component/paragraph/html.py
--- a/src/pyams_content/component/paragraph/html.py	Fri Apr 06 12:27:58 2018 +0200
+++ b/src/pyams_content/component/paragraph/html.py	Fri Apr 06 23:14:49 2018 +0200
@@ -9,6 +9,7 @@
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
 #
+from pyams_sequence.interfaces import ISequentialIntIds
 
 __docformat__ = 'restructuredtext'
 
@@ -128,7 +129,8 @@
         has_link = False
         href = link.attrib['href']
         if href.startswith('oid://'):
-            oid = href.split('//', 1)[1]
+            sequence = get_utility(ISequentialIntIds)
+            oid = sequence.get_full_oid(href.split('//', 1)[1])
             for association in associations.values():
                 internal_info = IInternalLink(association, None)
                 if (internal_info is not None) and (internal_info.reference == oid):