diff --git a/scipost/models.py b/scipost/models.py index 54d353a287df104f36b49132e8fd5b49faa6f764..7703b1b8ee8929dedb9f00f2da765f3eb5d28fc4 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -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): """