SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 5e8e05e4 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Tweak str method for AuthorshipClaim

parent 3deb4c95
No related branches found
No related tags found
No related merge requests found
......@@ -271,6 +271,15 @@ class AuthorshipClaim(models.Model):
objects = AuthorshipClaimQuerySet.as_manager()
def __str__(self):
if self.submission:
return "Authorship claim: %s for %s %s" % (self.claimant, "Submission", self.submission)
elif self.commentary:
return "Authorship claim: %s for %s %s" % (self.claimant, "Commentary", self.commentary)
elif self.thesislink:
return "Authorship claim: %s for %s %s" % (self.claimant, "Thesis Link", self.thesislink)
return "Authorship claim: %s for [undefined]" % self.claimant
class PrecookedEmail(models.Model):
"""
......
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