Skip to content

Bug: datetime fields not correctly parsed back to JSON-LD #945

@zigaklun

Description

@zigaklun

There is a bug affecting the handling of datetime fields when parsing data back into JSON. In the CI tests, dateCreated and datePublished fields are being returned as Python datetime objects (e.g., datetime.datetime(2024, 3, 18, 0, 0)) rather than properly formatted JSON strings (e.g., '2024-03-18 00:00:00').

  -     'dateCreated': '2024-03-18 00:00:00',
  -     'datePublished': '2024-03-18 00:00:00',
  +     'dateCreated': datetime.datetime(2024, 3, 18, 0, 0),
  +     'datePublished': datetime.datetime(2024, 3, 18, 0, 0),

Currently, this issue causes CI tests to fail. To unblock progress, it was suggested to temporarily remove these fields from the test data, but a bug should be filed for proper resolution.

For reference look at the conversation in PR: #936

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions