From 8cfdfca242c5027c1b310aa8cba1d29b78131367 Mon Sep 17 00:00:00 2001 From: Florent Yvon Date: Fri, 12 Jan 2024 16:41:57 +0000 Subject: [PATCH 1/2] Updating pub curation annotation release date --- release/scripts/run_release_script.py | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/run_release_script.py b/release/scripts/run_release_script.py index 293a1933..8c973b98 100644 --- a/release/scripts/run_release_script.py +++ b/release/scripts/run_release_script.py @@ -207,6 +207,7 @@ def update_curation_tracker(): curation_pub.curation_status = 'Embargo Imported - Awaiting Release' else: curation_pub.curation_status = 'Released' + curation_pub.release_date = lastest_release curation_pub.save() except CurationPublicationAnnotation.DoesNotExist: print(f"Can't find study in Curation Tracker to add the new PGP ID '{pgp_id}'") From d1cd19f55e4fdc323977dfebdc425168b488eefe Mon Sep 17 00:00:00 2001 From: Florent Yvon Date: Fri, 12 Jan 2024 16:56:28 +0000 Subject: [PATCH 2/2] Changed release date variable name to avoid confusion --- release/scripts/run_release_script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release/scripts/run_release_script.py b/release/scripts/run_release_script.py index 8c973b98..266c281f 100644 --- a/release/scripts/run_release_script.py +++ b/release/scripts/run_release_script.py @@ -188,12 +188,12 @@ def call_create_release(): def update_curation_tracker(): """ Update entries in Curation Tracker """ - lastest_release = Release.objects.latest('date').date + new_release_date = Release.objects.latest('date').date curation_tracker = 'curation_tracker' # Released publications - publications = Publication.objects.filter(date_released=lastest_release) + publications = Publication.objects.filter(date_released=new_release_date) for publication in publications: if publication.doi: pgp_id = publication.id @@ -207,7 +207,7 @@ def update_curation_tracker(): curation_pub.curation_status = 'Embargo Imported - Awaiting Release' else: curation_pub.curation_status = 'Released' - curation_pub.release_date = lastest_release + curation_pub.release_date = new_release_date curation_pub.save() except CurationPublicationAnnotation.DoesNotExist: print(f"Can't find study in Curation Tracker to add the new PGP ID '{pgp_id}'")