Skip to content

Commit

Permalink
Merge pull request PGScatalog#326 from fyvon/improve/update_curation_…
Browse files Browse the repository at this point in the history
…release

Updating pub curation annotation release date
  • Loading branch information
ens-lgil authored Jan 12, 2024
2 parents ccaae3d + d1cd19f commit 29fac48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions release/scripts/run_release_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = 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}'")
Expand Down

0 comments on commit 29fac48

Please sign in to comment.