Skip to content

Commit

Permalink
Merge pull request #2074 from MIT-LCP/bg_title_change
Browse files Browse the repository at this point in the history
Use title being shown in project preview for new publications
  • Loading branch information
tompollard authored Sep 7, 2023
2 parents 5cef547 + 82aeaa3 commit eaaea0c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions physionet-django/project/modelcomponents/activeproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def clear_files(self):
"""
self.files.rmtree(self.file_root())

def publish(self, slug=None, make_zip=True, title=None):
def publish(self, slug=None, make_zip=True):
"""
Create a published version of this project and update the
submission status.
Expand Down Expand Up @@ -571,14 +571,13 @@ def publish(self, slug=None, make_zip=True, title=None):
previous_published_projects = self.core_project.publishedprojects.all()

slug = previous_published_projects.first().slug
title = previous_published_projects.first().title
if slug != published_project.slug:
raise ValueError(
{"message": "The published project has different slugs."})

# Set the slug if specified
published_project.slug = slug or self.slug
published_project.title = title or self.title
published_project.title = self.title
published_project.doi = self.doi

# Change internal links (that point to files within
Expand Down

0 comments on commit eaaea0c

Please sign in to comment.