Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pycsw/ogc/api/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,17 +1165,21 @@ def record2json(record, url, collection, mode='ogcapi-records'):
record.otherconstraints = [record.otherconstraints]
record_dict['properties']['license'] = ", ".join(record.otherconstraints)

record_dict['properties']['updated'] = record.insert_date

if record.type:
record_dict['properties']['type'] = record.type

if record.date_creation:
record_dict['properties']['created'] = record.date_creation
record_dict['properties']['updated'] = record.insert_date # this is always populated

if record.date: # date is used in some schema's (DC)
record_dict['properties']['updated'] = record.date

if record.date_modified:
if record.date_modified: # used in ISO
record_dict['properties']['updated'] = record.date_modified

# pycsw does not capture date of record creation, use updated
record_dict['properties']['created'] = record_dict['properties']['updated']

if record.language:
record_dict['properties']['language'] = record.language

Expand Down
Loading