From ae10aa7cb81e2dfffaf16c31047efbf1196db3fd Mon Sep 17 00:00:00 2001 From: Brian Gow Date: Wed, 6 Sep 2023 16:56:54 -0400 Subject: [PATCH 1/2] default title assignment --- physionet-django/project/modelcomponents/activeproject.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/physionet-django/project/modelcomponents/activeproject.py b/physionet-django/project/modelcomponents/activeproject.py index 397809af9e..4b69658547 100644 --- a/physionet-django/project/modelcomponents/activeproject.py +++ b/physionet-django/project/modelcomponents/activeproject.py @@ -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 From 82aeaa3478031d6776de6c1107fea05b7c5a8067 Mon Sep 17 00:00:00 2001 From: Brian Gow Date: Thu, 7 Sep 2023 10:57:00 -0400 Subject: [PATCH 2/2] remove unused parameter from activeproject publish --- physionet-django/project/modelcomponents/activeproject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physionet-django/project/modelcomponents/activeproject.py b/physionet-django/project/modelcomponents/activeproject.py index 4b69658547..7eed7e6f21 100644 --- a/physionet-django/project/modelcomponents/activeproject.py +++ b/physionet-django/project/modelcomponents/activeproject.py @@ -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.