From 7cc7577e14804cb834d791d091efa8450bb2ac4a Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Thu, 7 Nov 2019 07:42:01 +0100 Subject: [PATCH] Debug and cleanup --- submissions/models/assignment.py | 2 +- submissions/models/plagiarism.py | 2 +- submissions/models/recommendation.py | 1 - submissions/models/referee_invitation.py | 2 +- submissions/models/report.py | 4 ++-- submissions/models/submission.py | 3 --- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/submissions/models/assignment.py b/submissions/models/assignment.py index 6af06c8f3..5f92fd314 100644 --- a/submissions/models/assignment.py +++ b/submissions/models/assignment.py @@ -39,7 +39,7 @@ class EditorialAssignment(SubmissionRelatedObjectMixin, models.Model): ordering = ['-date_created'] def __str__(self): - """Summerize the EditorialAssignment's basic information.""" + """Summarize the EditorialAssignment's basic information.""" return (self.to.user.first_name + ' ' + self.to.user.last_name + ' to become EIC of ' + self.submission.title[:30] + ' by ' + self.submission.author_list[:30] + ', requested on ' + self.date_created.strftime('%Y-%m-%d')) diff --git a/submissions/models/plagiarism.py b/submissions/models/plagiarism.py index d30e65819..20e5302e2 100644 --- a/submissions/models/plagiarism.py +++ b/submissions/models/plagiarism.py @@ -55,7 +55,7 @@ class iThenticateReport(TimeStampedModel): if not self.part_id: return '' - from .plagiarism import iThenticate + from ..plagiarism import iThenticate plagiarism = iThenticate() return plagiarism.get_url(self.part_id) diff --git a/submissions/models/recommendation.py b/submissions/models/recommendation.py index 5efa98e7f..a1de1abfc 100644 --- a/submissions/models/recommendation.py +++ b/submissions/models/recommendation.py @@ -36,7 +36,6 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model): status = models.CharField(max_length=32, choices=EIC_REC_STATUSES, default=VOTING_IN_PREP) version = models.SmallIntegerField(default=1) active = models.BooleanField(default=True) - # status = models.CharField(default='', max_length=180) # Editorial Fellows who have assessed this recommendation: eligible_to_vote = models.ManyToManyField('scipost.Contributor', blank=True, diff --git a/submissions/models/referee_invitation.py b/submissions/models/referee_invitation.py index af3e5ed89..2aad96d53 100644 --- a/submissions/models/referee_invitation.py +++ b/submissions/models/referee_invitation.py @@ -55,7 +55,7 @@ class RefereeInvitation(SubmissionRelatedObjectMixin, models.Model): ordering = ['cancelled', 'date_invited'] def __str__(self): - """Summerize the RefereeInvitation's basic information.""" + """Summarize the RefereeInvitation's basic information.""" return (self.first_name + ' ' + self.last_name + ' to referee ' + self.submission.title[:30] + ' by ' + self.submission.author_list[:30] + ', invited on ' + self.date_invited.strftime('%Y-%m-%d')) diff --git a/submissions/models/report.py b/submissions/models/report.py index cf33b6ad5..933736e56 100644 --- a/submissions/models/report.py +++ b/submissions/models/report.py @@ -98,7 +98,7 @@ class Report(SubmissionRelatedObjectMixin, models.Model): ordering = ['-date_submitted'] def __str__(self): - """Summerize the RefereeInvitation's basic information.""" + """Summarize the RefereeInvitation's basic information.""" return (self.author.user.first_name + ' ' + self.author.user.last_name + ' on ' + self.submission.title[:50] + ' by ' + self.submission.author_list[:50]) @@ -191,7 +191,7 @@ class Report(SubmissionRelatedObjectMixin, models.Model): def associated_published_doi(self): """Return the related Publication doi. - Check if the Report relates to a SciPost-published object. If it is, return the doi + Check if the Report relates to a SciPost-published object. If it does, return the doi of the published object. """ try: diff --git a/submissions/models/submission.py b/submissions/models/submission.py index ab08cf3a0..64d58457c 100644 --- a/submissions/models/submission.py +++ b/submissions/models/submission.py @@ -38,9 +38,6 @@ from ..refereeing_cycles import ShortCycle, DirectCycle, RegularCycle class Submission(models.Model): """ A Submission is a preprint sent to SciPost for consideration. - - The class collects all the information necessary to run the editorial - process. """ preprint = models.OneToOneField('preprints.Preprint', on_delete=models.CASCADE, -- GitLab