Skip to content

Commit

Permalink
update to latest OARec
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Oct 2, 2024
1 parent 05e98f5 commit 77c4e37
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pygeometa/schemas/ogcapi_records/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]:
'title': title[0],
'description': description[0],
'themes': [],
'language': self.lang1,
'language': {
'code': self.lang1
},
'type': mcf['metadata']['hierarchylevel'],
},
'links': []
Expand Down Expand Up @@ -169,12 +171,12 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]:
for v in mcf['distribution'].values():
format_ = get_charstring(v.get('format'), self.lang1, self.lang2)
if format_[0] is not None:
formats.append(format_)
formats.append(format_[0])

LOGGER.debug('Checking for formats')
if formats:
record['properties']['formats'] = list(
set([f[0] for f in formats]))
formats2 = set(formats)
record['properties']['formats'] = [{'name': f} for f in formats2]

LOGGER.debug('Checking for contacts')
record['properties']['contacts'] = self.generate_contacts(
Expand Down

0 comments on commit 77c4e37

Please sign in to comment.