From 8c23bdff6da19772f4c394d95529e888dc38da76 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 29 Feb 2016 15:03:09 +0000 Subject: [PATCH] Implement DocumentProperties.__unicode__ --- pandora/entity/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/entity/models.py b/pandora/entity/models.py index 0b912614..9b5eb20f 100644 --- a/pandora/entity/models.py +++ b/pandora/entity/models.py @@ -206,7 +206,7 @@ class Entity(models.Model): ids.append(key['id']) save('name', u'\n'.join([self.name] + list(self.alternativeNames))) self.find.exclude(key__in=ids).delete() - + def update_matches(self): import annotation.models import item.models @@ -263,6 +263,9 @@ class DocumentProperties(models.Model): index = models.IntegerField(default=0) + def __unicode__(self): + return u"%r-%r" % (self.document, self.entity) + def save(self, *args, **kwargs): super(DocumentProperties, self).save(*args, **kwargs)