Skip to content

Commit

Permalink
Fixed the case of multiple publishers and contributors for DublinCore…
Browse files Browse the repository at this point in the history
… metadata.
  • Loading branch information
ahmdthr committed Jan 13, 2025
1 parent 3e9cf6f commit 1431ece
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pycsw/ogc/csw/csw2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,8 +1543,13 @@ def _write_record(self, recobj, queryables):
'dc:language', 'dc:rights', 'dct:alternative']:
val = util.getqattr(recobj, queryables[i]['dbcol'])
if val:
etree.SubElement(record,
util.nspath_eval(i, self.parent.context.namespaces)).text = val
if isinstance(val, list): # if there are multiple publishers or contributors
for v in val:
etree.SubElement(record,
util.nspath_eval(i, self.parent.context.namespaces)).text = str(v)
else:
etree.SubElement(record,
util.nspath_eval(i, self.parent.context.namespaces)).text = val
val = util.getqattr(recobj, queryables['dct:spatial']['dbcol'])
if val:
etree.SubElement(record,
Expand Down

0 comments on commit 1431ece

Please sign in to comment.