Skip to content

Commit a7f4a22

Browse files
feat(service): date_published in datasets.list response (#3648)
1 parent 77f480f commit a7f4a22

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

renku/domain_model/dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ class DatasetDetailsJson(marshmallow.Schema):
738738
slug = marshmallow.fields.String(required=True)
739739
version = marshmallow.fields.String(allow_none=True)
740740
created_at = marshmallow.fields.String(allow_none=True, attribute="date_created")
741+
date_published = marshmallow.fields.String(allow_none=True)
741742

742743
name = marshmallow.fields.String()
743744
creators = marshmallow.fields.List(marshmallow.fields.Nested(DatasetCreatorsJson))

tests/service/views/test_dataset_views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ def test_list_datasets_view(svc_client_with_repo):
630630
"annotations",
631631
"storage",
632632
"data_directory",
633+
"date_published",
633634
} == set(response.json["result"]["datasets"][0].keys())
634635

635636

@@ -678,6 +679,7 @@ def test_list_datasets_view_remote(svc_client_with_repo, it_remote_repo_url):
678679
"identifier",
679680
"images",
680681
"created_at",
682+
"date_published",
681683
"slug",
682684
"name",
683685
"creators",
@@ -797,6 +799,7 @@ def test_create_and_list_datasets_view(svc_client_with_repo):
797799
"annotations",
798800
"storage",
799801
"data_directory",
802+
"date_published",
800803
} == set(response.json["result"]["datasets"][0].keys())
801804

802805
assert payload["slug"] in [ds["slug"] for ds in response.json["result"]["datasets"]]

0 commit comments

Comments
 (0)