SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit d2f94a8c authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Remove unwanted raise

parent 754e6d80
No related branches found
No related tags found
No related merge requests found
...@@ -69,8 +69,6 @@ class RequestCommentaryForm(forms.ModelForm): ...@@ -69,8 +69,6 @@ class RequestCommentaryForm(forms.ModelForm):
self.existing_commentary = get_object_or_404( self.existing_commentary = get_object_or_404(
Commentary, Commentary,
arxiv_identifier=cleaned_data['arxiv_identifier']) arxiv_identifier=cleaned_data['arxiv_identifier'])
if not self.existing_commentary:
raise
self.add_error('arxiv_identifier', msg) self.add_error('arxiv_identifier', msg)
elif (cleaned_data['pub_DOI'] and elif (cleaned_data['pub_DOI'] and
Commentary.objects.filter(pub_DOI=cleaned_data['pub_DOI']).exists()): Commentary.objects.filter(pub_DOI=cleaned_data['pub_DOI']).exists()):
......
...@@ -20,7 +20,6 @@ class CommentaryManager(models.Manager): ...@@ -20,7 +20,6 @@ class CommentaryManager(models.Manager):
def awaiting_vetting(self, **kwargs): def awaiting_vetting(self, **kwargs):
return self.filter(vetted=False, **kwargs) return self.filter(vetted=False, **kwargs)
class Commentary(TimeStampedModel): class Commentary(TimeStampedModel):
""" """
A Commentary contains all the contents of a SciPost Commentary page for a given publication. A Commentary contains all the contents of a SciPost Commentary page for a given publication.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment