add str method for OutgoingEmail

This commit is contained in:
Stephan Telling 2017-05-21 20:57:16 +02:00
parent 46cf9c53f7
commit da26b3e0d3
No known key found for this signature in database
GPG key ID: D4892289F36ADA9B

View file

@ -94,6 +94,9 @@ class OutgoingEmail(CreatedUpdatedModel):
attachment = models.FileField(blank=True)
processed = models.BooleanField(default=False)
def __str__(self):
return 'OutgoingEmail Object id: {} '.format(self.id)
def clean(self):
if not self.to_recipients \
and not self.bcc_recipients \