Skip to content

Commit 7258dc6

Browse files
committed
Made sure that Email.__unicode__() will return a string even if address is None. Fixes an exception on deleting an email address for a Person object in the admin interface.
- Legacy-Id: 9159
1 parent a4e0287 commit 7258dc6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/person/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class Email(models.Model):
156156
active = models.BooleanField(default=True) # Old email addresses are *not* purged, as history
157157
# information points to persons through these
158158
def __unicode__(self):
159-
return self.address
159+
return self.address or "Email object with id: %s"%self.pk
160160

161161
def get_name(self):
162162
return self.person.plain_name() if self.person else self.address

0 commit comments

Comments
 (0)