Skip to content
Merged
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
19 changes: 11 additions & 8 deletions src/app_neo4j_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1872,14 +1872,17 @@ def get_individual_prov_info(neo4j_driver, dataset_uuid):
content_sixteen, key=lambda d: d["last_modified_timestamp"], reverse=True
)

published_processed_dataset_location = next(
(i for i, item in enumerate(content_sixteen) if item["status"] == "Published"), None
)
if published_processed_dataset_location and published_processed_dataset_location != 0:
published_processed_dataset = content_sixteen.pop(
published_processed_dataset_location
)
content_sixteen.insert(0, published_processed_dataset)
# We are modifying the response of /prov-info to return derived datasets simply by last modified timestamp.
# We want to highlight QA datasets that were more recently touched over older published datasets.

# published_processed_dataset_location = next(
# (i for i, item in enumerate(content_sixteen) if item["status"] == "Published"), None
# )
# if published_processed_dataset_location and published_processed_dataset_location != 0:
# published_processed_dataset = content_sixteen.pop(
# published_processed_dataset_location
# )
# content_sixteen.insert(0, published_processed_dataset)

record_dict["processed_dataset"] = content_sixteen
return record_dict
Expand Down