@@ -825,6 +825,8 @@ def getrecords(self):
825825 self .parent .kvp ['startposition' ] = 1
826826
827827 # query repository
828+ print ("AST" , self .parent .kvp ['constraint' ]['ast' ])
829+ print ("AST" , dir (self .parent .kvp ['constraint' ]['ast' ]))
828830 LOGGER .debug ('Querying repository with constraint: %s,\
829831 sortby: %s, typenames: %s, maxrecords: %s, startposition: %s' ,
830832 self .parent .kvp ['constraint' ], self .parent .kvp ['sortby' ], self .parent .kvp ['typenames' ],
@@ -1005,6 +1007,8 @@ def getrecords(self):
10051007 self .parent .response = self .exceptionreport (
10061008 'NoApplicableCode' , 'service' ,
10071009 'Record serialization failed: %s' % str (err ))
1010+ import traceback
1011+ print (traceback .format_exc ())
10081012 return self .parent .response
10091013
10101014 if len (dsresults ) > 0 : # return DistributedSearch results
@@ -1545,13 +1549,16 @@ def _write_record(self, recobj, queryables):
15451549 self .parent .context .md_core_model ['mappings' ]['pycsw:Links' ])
15461550
15471551 if rlinks :
1548- for link in util .jsonify_links (rlinks ):
1552+ if isinstance (rlinks , str ):
1553+ rlinks = util .jsonify_links (rlinks )
1554+ for link in rlinks :
1555+ print ("LINK" , link )
15491556 ref = etree .SubElement (record , util .nspath_eval ('dct:references' ,
15501557 self .parent .context .namespaces ))
15511558 if link .get ('protocol' ):
15521559 ref .attrib ['scheme' ] = link ['protocol' ]
15531560
1554- ref .text = link [ 'url' ]
1561+ ref .text = link . get ( 'url' , link . get ( 'href' ))
15551562
15561563 for i in ['dc:relation' , 'dct:modified' , 'dct:abstract' ]:
15571564 val = util .getqattr (recobj , queryables [i ]['dbcol' ])
0 commit comments