diff options
Diffstat (limited to 'app/normalize/models.py')
-rw-r--r-- | app/normalize/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/normalize/models.py b/app/normalize/models.py index 8333681..b99ae1e 100644 --- a/app/normalize/models.py +++ b/app/normalize/models.py @@ -17,7 +17,11 @@ class RelatedPost(models.Model): def __str__(self): if self.model_name.name == 'post': - p = apps.get_model("posts", "Post").objects.get(id=self.entry_id) + print(self.entry_id) + try: + p = apps.get_model("posts", "Post").objects.get(id=self.entry_id) + except: + print(self.title) return "%s - %s" % (p.get_post_type_display(), self.title) else: return "%s - %s" % (self.model_name, self.title) |