# HG changeset patch # User Denis Laxalde # Date 1426254455 -3600 # Node ID a12e4459eee54e93fcfbcb195912e5e839d7dd96 # Parent f7dfcb3add15c488477289e124599798647a8c3c [web/views/rdf] Take the second element of XY equivalent for non final relation When given a Yams snippet of the form ` ` ``xy.xeq()`` will return the XML snippet equivalent to this relation in the form of a tuple `(subject, rtype, object)` so ``item`` will always be a tuple here. In fact, the correct code appears just a few lines above (around line 88) for final relations so I guess this is a copy-paste mistake. Closes #4745929. diff -r f7dfcb3add15 -r a12e4459eee5 web/views/rdf.py --- a/web/views/rdf.py Wed Feb 11 12:42:19 2015 +0100 +++ b/web/views/rdf.py Fri Mar 13 14:47:35 2015 +0100 @@ -94,7 +94,7 @@ add( (cwuri, CW[rtype], URIRef(related.cwuri)) ) try: for item in xy.xeq('%s %s' % (entity.e_schema.type, rtype)): - add( (cwuri, urijoin(item), URIRef(related.cwuri)) ) + add( (cwuri, urijoin(item[1]), URIRef(related.cwuri)) ) except xy.UnsupportedVocabulary: pass else: